PUZZLE – 2 – Queries

What is the output of each statement in the below query:

[sql]
SELECT 1 WHERE NULL = NULL

SELECT COUNT(10)

SELECT COUNT(C1) FROM (SELECT ‘A’ AS C1 UNION ALL SELECT ‘B’ UNION ALL SELECT NULL) T

SELECT NULL
UNION
SELECT NULL
[/sql]

Please provide your comments.

One thought on “PUZZLE – 2 – Queries

Leave a Reply

Your email address will not be published. Required fields are marked *