SQL Quiz: UNION & CROSS JOIN

This SQL quiz covers the set operators UNION, UNION ALL, INTERSECT and EXCEPT, and the CROSS JOIN that pairs every row with every other. You will predict how duplicates and NULLs are handled, how ORDER BY applies and how many rows a cross join makes.

मीडियम 10 सवाल ~6 मिनट पास होने के लिए 80% SQLite

मोड चुनें

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

सैंपल सवाल

सवाल 1 / 10

What does this print?

CREATE TABLE a (x INTEGER);
CREATE TABLE b (x INTEGER);
INSERT INTO a VALUES (1), (2);
INSERT INTO b VALUES (2), (3);
SELECT x FROM a
UNION
SELECT x FROM b
ORDER BY x;
जवाब दिखाएं

B. 1 2 3 UNION stacks both results and removes duplicate rows, so the 2 that appears on both sides is kept once. Only rows in both would be INTERSECT.

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

  • UNION removes duplicates, UNION ALL keeps them
  • Matching column counts in set operations
  • ORDER BY on a whole union
  • INTERSECT and EXCEPT
  • Every combination with CROSS JOIN

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

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

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

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

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