Commands 1 Flashcards
(29 cards)
extracts data from a database
SELECT
updates data in a database
UPDATE
Deletes data from the database
DELETE
inserts new data into a database
INSERT INTO
creates a new database
CREATE DATABASE
modifes a database
ALTER DATABASE
creates a new table
CREATE TABLE
modifies a table
ALTER TABLE
deletes a table
DROP TABLE
creates an index (search key)
CREATE INDEX
Deletes an Index
DROP INDEX
used to sort the result-set in ascending or descending order.
ORDER BY
clause that lets you specify the maximum number of rows the result set will have.
LIMIT
specifies where to start from.
OFFSET
Used to select values within a range
BETWEEN
Values must be separated by the and keyword
used to specify a range of conditions, any of which can be matched
IN
Special operator used with the WHERE clause to search for a specific pattern in a column.
LIKE
LIKE is a predicate
used to specify a set of characters, any one of which must match a character in the specified position
The wildcard bracket [ ]
keyword in SQL that allows you to rename a column or table using an alias.
AS
aggregate function that returns the average value for a numeric column.
AVG()
function that takes the name of a column as an argument and counts the number of rows where the column is notNULL.
COUNT()
clause that indicates you want to filter the result set to include only rows where the followingconditionis true.
WHERE
function that takes the name of a column as an argument and returns the smallest value in that column.
MIN()
function that takes the name of a column as an argument and returns the largest value in that column.
MAX()