Introduction
SQL is the language of data, and it shows up in almost every backend, data-analyst, and data-engineering interview. The good news is that a solid grasp of a few core concepts, queries, JOINs, keys, and aggregation, covers the majority of questions you will face.
Below are 20 SQL quiz questions with clear answers and short explanations. They apply to standard SQL, so they hold true across MySQL, PostgreSQL, SQL Server, and SQLite with only minor syntax differences.
SQL Basics & Queries (1โ10)
What does SQL stand for?
Think of your answer, then reveal it to check.
When writing an UPDATE or DELETE, mention that you would run the WHERE condition as a SELECT first. It shows caution and prevents accidentally changing every row.
Keys, JOINs & Aggregation (11โ20)
What is a PRIMARY KEY?
Think of your answer, then reveal it to check.
Running UPDATE or DELETE without a WHERE clause affects every row in the table. Double-check your condition before executing.