Loading…
Loading…
Twenty-five questions on SQL's subtle corners: NULLs in aggregates, IN and CHECK, sort order of NULLs, rounding, CHAR padding, window frame defaults, identity gaps, LIKE escapes, empty groups, set operations and multi-column updates.
SQL is full of small rules that rarely matter, until they produce a wrong answer that looks right. This quiz collects the most surprising ones. Most were explained somewhere in the SQL course, but seeing them together, out of context, is a good test.
Every question with a query was run on PostgreSQL 17, and the explanations note where other databases differ. Aim for at least 18 out of 25.
Quiz path: step 15. Take the quizzes in this order, after reading each article.
Previous quiz: SQL Interview Questions
Next quiz: SQL Dialect Differences (PostgreSQL, MySQL, SQL Server, Oracle, SQLite)
25 questions · pass at 70%
Check your understanding; you see the answers and explanations after submitting.
Discussion
Sign in to ask a question or share what you learned.