Basic SQL Statement Definitions Flashcards
What does SQL stand for?
Structured Query Language
SELECT
The SELECT statement is used to select data from a database.
SELECT DISTINCT
The SELECT DISTINCT statement is used to return only distinct (different) values.
WHERE
The WHERE clause is used to filter records. It is used to extract only those records that fulfill a specified condition.
AND
The AND operator displays a record if all the conditions separated by AND are TRUE.
OR
The OR operator displays a record if any of the conditions separated by OR is TRUE.
NOT
The NOT operator displays a record if the condition(s) is NOT TRUE.
ORDER BY
The ORDER BY keyword is used to sort the result-set in ascending or descending order. The ORDER BY keyword sorts the records in ascending order by default.
DESC
Used with the ORDER BY keyword to sort the records in descending order.
INSERT INTO
The INSERT INTO statement is used to insert new records in a table.
NULL
A field with a NULL value is a field with no value.
UPDATE
The UPDATE statement is used to modify the existing records in a table.
DELETE
The DELETE statement is used to delete existing records in a table.
SELECT TOP
The SELECT TOP clause is used to specify the number of records to return.
MAX()
The MAX() function returns the largest value of the selected column.
MIN()
The MIN() function returns the smallest value of the selected column.
COUNT()
The COUNT() function returns the number of rows that matches a specified criterion.
AVG()
The AVG() function returns the average value of a numeric column.
SUM()
The SUM() function returns the total sum of a numeric column.
LIKE
The LIKE operator is used in a WHERE clause to search for a specified pattern in a column.