Define SELECT statement.
It retrieves data from one or more tables in a database.
What does WHERE clause do?
It filters records based on specified conditions.
True or false: INSERT statement adds new rows to a table.
TRUE
Fill in the blank: UPDATE modifies existing ______ in a table.
records
What is the purpose of DELETE statement?
It removes rows from a table based on conditions.
Define JOIN.
It combines rows from two or more tables based on a related column.
What does GROUP BY do?
It groups rows sharing a property so aggregate functions can be applied.
True or false: ORDER BY sorts the result set.
TRUE
Fill in the blank: HAVING is used to filter records after ______.
aggregation
What is an alias in SQL?
A temporary name for a table or column for easier reference.
Define PRIMARY KEY.
A unique identifier for each record in a table.
What does FOREIGN KEY enforce?
Referential integrity between two related tables.
True or false: DISTINCT removes duplicate records from results.
TRUE
Fill in the blank: COUNT() function returns the number of ______.
rows
What is the purpose of LIMIT clause?
It restricts the number of rows returned in a query.
Define VIEW in SQL.
A virtual table based on the result set of a query.
What does UNION do?
It combines the results of two or more SELECT statements.
True or false: NULL represents a value in SQL.
FALSE
NULL indicates the absence of a value.
Fill in the blank: CASE statement provides ______ logic in SQL.
conditional
What is the purpose of INDEX?
It improves the speed of data retrieval operations on a database table.
Define TRIGGER.
A set of instructions that automatically executes in response to certain events on a table.
What does ROLLBACK do?
It undoes changes made in the current transaction.
True or false: COMMIT saves all changes made in a transaction.
TRUE
Fill in the blank: ALTER TABLE modifies the structure of an existing ______.
table