Does it throw an error?
Do you get any resultset?
Do you get a single row containing NULL?
Do you get a single row with 'Something' data?
Do you get multiple rows?
Cheers!
SELECT 'Something'
WHERE 1=2
HAVING 1=1
Note: You can easily check your answer by running the query but please check your skills before you do so.
AS My answer is it return NUll Record because where condition is 1=2 if it is 1=1 then it will display data
ReplyDeletebut after excuting query i got result as 'Something' why give me the reason
This is horrible "puzzle". It in no way tests someone's SQL skills.
ReplyDelete@Anonymous:
ReplyDeleteIf this is horrible "puzzle" then you should know the answer better... If someone can't answer this puzzle means there is something special in this ;)