{"id":31,"date":"2011-07-01T11:26:34","date_gmt":"2011-07-01T11:26:34","guid":{"rendered":"https:\/\/sqlserverlearner.azurewebsites.net\/2011\/07\/01\/puzzle2\/"},"modified":"2011-07-01T11:26:34","modified_gmt":"2011-07-01T11:26:34","slug":"puzzle2","status":"publish","type":"post","link":"https:\/\/sqlserverlearner.com\/2011\/07\/01\/puzzle2\/","title":{"rendered":"PUZZLE – 2 – Queries"},"content":{"rendered":"

What is the output of each statement in the below query:<\/p>\n

[sql]
\nSELECT 1 WHERE NULL = NULL<\/p>\n

SELECT COUNT(10)<\/p>\n

SELECT COUNT(C1) FROM (SELECT ‘A’ AS C1 UNION ALL SELECT ‘B’ UNION ALL SELECT NULL) T<\/p>\n

SELECT NULL
\nUNION
\nSELECT NULL
\n[\/sql]<\/p>\n

Please provide your comments.<\/p>\n","protected":false},"excerpt":{"rendered":"

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.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[88],"tags":[],"_links":{"self":[{"href":"https:\/\/sqlserverlearner.com\/wp-json\/wp\/v2\/posts\/31"}],"collection":[{"href":"https:\/\/sqlserverlearner.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sqlserverlearner.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sqlserverlearner.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sqlserverlearner.com\/wp-json\/wp\/v2\/comments?post=31"}],"version-history":[{"count":0,"href":"https:\/\/sqlserverlearner.com\/wp-json\/wp\/v2\/posts\/31\/revisions"}],"wp:attachment":[{"href":"https:\/\/sqlserverlearner.com\/wp-json\/wp\/v2\/media?parent=31"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sqlserverlearner.com\/wp-json\/wp\/v2\/categories?post=31"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sqlserverlearner.com\/wp-json\/wp\/v2\/tags?post=31"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}