Variables in a false IF condition – SQL Interview questions

These are very simple and interesting SQL interview questions , many gets confused while answering it. Try thinking the answer yourself without executing the queries or seeing the answer below.

Question 01:

Question 02:

Question 03:

Answers:

Question 01: NULL

Question 02: An empty table

Question 03: Error Invalid object name

Share your thoughts on this in comment section below, why the Q1 and Q2 did not give any error like Q3?

Prasad Sahoo

Prasad Sahoo, is an enthusiast of Microsoft technologies in general and a passionate database professional, mainly focusing on SQL Server performance tuning and business intelligence. He has contributed a long time of his career working on SQL Server and other RDBMS. If he is not busy with SQL stuff then he must be watching some Hollywood movies.

Leave a Reply

%d bloggers like this: