Question: What would be the output of the following block of code:
Answer:
DECLARE @TEMP varchar(100) SET @TEMP = NULL IF @TEMP = '' PRINT('A') IF LTRIM(RTRIM(@TEMP )) = '' PRINT('B') IF @TEMP IS NULL PRINT('C') IF @TEMP = NULL PRINT('D') IF ISNULL(@TEMP,'') = '' PRINT('E')
The code will not compile and will generate an errors. Error in first line.
No comments:
Post a Comment