Tricky NULL Questions

This SQL quiz is all about NULL, the value that means "unknown" and breaks many people's intuition. You will predict how comparisons, NOT IN, aggregates, grouping and sorting treat NULL, and where SQLite, MySQL and PostgreSQL differ.

कठिन 10 सवाल ~8 मिनट पास होने के लिए 80% SQLite

मोड चुनें

आप गेस्ट के तौर पर खेल रहे हैं: XP और streak सेव रखने के लिए साइन इन करें।

सैंपल सवाल

सवाल 1 / 10

What does this print?

SELECT CASE WHEN NULL = NULL THEN 'equal' ELSE 'not equal' END;
जवाब दिखाएं

B. not equal Comparing anything with NULL gives NULL (unknown), not true, so CASE falls through to ELSE. Use IS NULL, or IS NOT DISTINCT FROM in PostgreSQL (<=> in MySQL, IS in SQLite) to compare values that may be NULL.

इस क्विज़ में क्या है

  • Why NULL = NULL is not true
  • NOT IN vs NOT EXISTS when the list contains NULL
  • Aggregates and COUNT with NULL values
  • Three-valued logic with AND and OR
  • Sorting and grouping NULL, and NULLIF / COALESCE

अक्सर पूछे जाने वाले सवाल

क्या अकाउंट ज़रूरी है?

नहीं। कोई भी खेल सकता है। XP, streak, badge और हिस्ट्री सेव रखने के लिए साइन इन करें।

क्या मैं इसे दोबारा दे सकता हूं?

हां। आपका बेस्ट स्कोर सेव रहता है, और हर बार सवाल और जवाब शफ़ल होते हैं।