SQL
Commands in
2 Minutes
By Learn Coding
By Learn Coding
LearnCodingOfficial
Watch Now
SELECT: Select data from a database.
FROM: Specify the table you're pulling data
from.
WHERE: Filter the query to match a condition.
AS: Rename a column or table with an alias.
JOIN: Combine rows from two or more tables.
AND: Combine query conditions. All must be
met.
OR: Combine query conditions. One must be
met.
LIMIT: Limit rows returned. See also FETCH &
TOP.
IN: Specify multiple values when using
WHERE
INSERT: Add a single row to a table.
DROP: Delete TABLE, DATABASE, or INDEX.
GROUP BY: Group data into logical sets.
ORDER BY: Set the order of the result. Use
DESC to reverse order.
HAVING: Same as WHERE but filters groups.
COUNT: Count the number of rows.
AVG: Return the average of a column.
SUM: Return the sum of a column.
LIKE: Search for patterns in a column.
MIN: Return the minimum value of a
column.
MAX: Return the maximum value of a
column.
ALTER TABLE: Add/Remove columns from a
table.
UPDATE: Update table data.
CREATE: Create TABLE, DATABASE, INDEX,
or VIEW.
DELETE: Delete rows from a table.
CASE: Return value on a specified
condition.
IS NULL: Return only rows with a NULL
value.
COMMIT: Write transaction to the
database.
ROLLBACK: Undo a transaction block.
Learn coding
To learn and
grow Together