Interview Questions -- SQL Scenarios -- Part-4
Scenario-7: What is the output of following
Scenario-8: What is the output of following
Scenario-9: What is the output of following
Question-1: SELECT 1 + NULL
Ans :- :-
Question-2: SELECT 1-
NULL
Ans :-
Question-3: SELECT 1*
NULL
Ans :-
Question-4: SELECT 1/
NULL
Ans :-
Question-1: SELECT CASE WHEN 1=1
THEN 'True' else 'False' End
Ans :-
Question-2: SELECT CASE WHEN NULL=NULL
THEN 'True' else 'False' End
Ans :-
Question-1: DECLARE @A
INT
DECLARE @B INT
SET @A=1
SET @B=1
SELECT @A+@B AS ADDITION
Ans :-
Question-2: DECLARE @A VARCHAR(100)
DECLARE @B VARCHAR(100)
SET @A=1
SET @B=1
SELECT @A+@B AS CONCATENATION
Ans :-
Guys you can share your Query Through Comments.
Thank you for sharing such as wonderful articles. Those are very useful to MSBI learners. MSBI Online Training
ReplyDeleteThank you for sharing useful information,
ReplyDeleteIt is very useful mostly useful to who are searching for Msbi online training.
Scenario-8
ReplyDeleteQ1-True
Q2-False
Scenario-9
ReplyDeleteQ1- 2
Q2- 11
DECLARE @A VARCHAR(100)
ReplyDeleteDECLARE @B VARCHAR(100)
SET @A=1
SET @B=1
SELECT @A+@B AS CONCATENATION
Ans: 11
SELECT CASE WHEN NULL=NULL
ReplyDeleteTHEN 'True' else 'False' End
Ans: False