SQL Flashcards
Learn SQL Syntax (34 cards)
SQL Term
Description
SELECT
Used to select specific columns from a table.
FROM
Specifies the table to retrieve data from.
WHERE
Filters records based on specified conditions.
GROUP BY
Groups rows that share a property to apply aggregate functions.
HAVING
Filters groups based on aggregate results (used with GROUP BY).
LIMIT
Limits the number of rows returned by a query.
ORDER BY
Sorts the result set by one or more columns.
JOIN
Combines rows from two or more tables based on a related column.
INNER JOIN
Returns records that have matching values in both tables.
LEFT JOIN
Returns all records from the left table and matched records from the right table.
RIGHT JOIN
Returns all records from the right table and matched records from the left table.
FULL JOIN
Returns all records when there is a match in either left or right table.
INSERT INTO
Inserts new rows into a table.
UPDATE
Updates existing records in a table.
DELETE
Deletes records from a table.
DISTINCT
Selects distinct (unique) values in a column.
BETWEEN
Filters values within a specific range.
IN
Filters values that match any value in a list.
LIKE
Filters values using pattern matching (e.g., wildcards).
IS NULL
Checks for NULL (missing) values.
IS NOT NULL
Checks for non-NULL values.
UNION
Combines the result sets of two or more SELECT statements.
EXISTS
Checks if a subquery returns any records.