SQL: Query Fundamentals & Database Concepts
SQL: Query Fundamentals & Database Concepts
Up to 20 questions, shuffled on every run
Welcome to the SQL Basics Quiz! Relational databases are the bedrock of modern applications. Whether you’re a developer writing queries or a DevOps engineer maintaining a production cluster, mastering SQL is essential for data integrity and system performance. This quiz will test your knowledge from basic selection to complex joins and database management. Good luck!
Answer key and explanations20 questions
The quiz above draws 20 questions at random from these 30, so a second attempt will not be the same run. Everything in the pool is listed here.
What does "SQL" stand for?
AnswerStructured Query Language
Which SQL statement is used to extract data from a database?
AnswerSELECT
Which clause is used to filter records based on a specific condition?
AnswerWHERE
What is the purpose of the "INNER JOIN" keyword?
AnswerTo return records that have matching values in both tables
Which SQL command is used to update existing data in a table?
AnswerUPDATE
What is a "Primary Key"?
AnswerA column that uniquely identifies each row in a table
What is a "Foreign Key"?
AnswerA column that establishes a relationship between two tables
How do you sort the result set in SQL?
AnswerORDER BY
What is the "LEFT JOIN" keyword used for?
AnswerTo return all records from the left table and matched records from the right
What is "Database Normalization"?
AnswerOrganizing data to minimize redundancy and maximize data integrity
Which SQL command is used to remove a table from a database?
AnswerDROP
What is the "GROUP BY" clause used for?
AnswerTo arrange rows with identical values into summary rows
Which aggregate function finds the number of rows in a table?
AnswerCOUNT()
What is the "HAVING" clause used for?
AnswerTo filter groups based on a condition after aggregation
What does "NULL" represent in SQL?
AnswerThe state of a value being missing or unknown
Which keyword is used to return only unique values?
AnswerDISTINCT
What is the purpose of the "LIKE" operator?
AnswerTo search for a specified pattern within a string column
What is a "Transaction" in SQL?
AnswerA unit of work that succeeds or fails as a complete set
What is an "Index" used for?
AnswerTo provide a faster lookup path for retrieving data rows
Which SQL command is used to add new rows to a table?
AnswerINSERT INTO
What is a "View" in SQL?
AnswerA virtual table based on the results of a stored query
What does the "AS" keyword do?
AnswerIt creates a temporary alias for a column or table in a query
What is a "Constraint" in SQL?
AnswerA rule enforced on columns to ensure data accuracy and reliability
Which command changes the structure of an existing table?
AnswerALTER TABLE
What is "Referential Integrity"?
AnswerThe consistency between tables maintained via foreign key constraints
What does the "UNION" operator do?
AnswerIt combines the results of two SELECT statements into one set
What is a "Stored Procedure"?
AnswerA group of SQL statements that can be saved and reused
What is the "TRUNCATE" command?
AnswerIt removes all records from a table while keeping the structure
What does "ACID" stand for in database terms?
AnswerAtomicity, Consistency, Isolation, Durability
What is the difference between "DELETE" and "TRUNCATE"?
AnswerDELETE can remove specific rows, whereas TRUNCATE empties the whole table








