SQL Command Options (BASIC) Flashcards
(24 cards)
Describes the structure of a table
DESCRIBE
Inserts row(s) into a table
INSERT
Selects attributes from rows in one or more tables or views
SELECT
Restricts the selection of rows based on a conditional expression
WHERE
Groups the selected rows based on one or more attributes
GROUP BY
Restricts the selection of grouped rows based on a condition
HAVING
Orders the selected rows based on one or more attributes
ORDER BY
Modifies an attribute’s values in one or more table’s rows
UPDATE
Deletes one or more rows from a table
DELETE
Permanently saves data changes
COMMIT
Restores data to its original values
ROLLBACK
Comparison operators
=, , <=, >=, <>, !=
Logical operators
AND/OR/NOT
Checks whether an attribute value is within a range
BETWEEN
Checks whether an attribute value is null
IS NULL
Checks whether an attribute value matches a given string pattern
LIKE
Checks whether an attribute value matches any value within a value list
IN
Checks whether a subquery returns any rows
EXISTS
Limits values to unique values
DISTINCT
Returns the number of rows with non-null values for a given column
COUNT
Returns the minimum attribute value found in a given column
MIN
Returns the maximum attribute value found in a given column
MAX
Returns the sum of all values for a given column
SUM
Returns the average of all values for a given column
AVG