So here is the question for you – What will be the result of the SELECT CONCAT (NULL, NULL, NULL) statement?
Try to think about the answer before you watch the following video. I think once you watch the video, you will know the answer. One of the primary reasons, I have built this video is to help people who are migrating their SQL Server. I have seen lots of people using the previous method of the plus (+) sign and when they convert it to the newer method of CONCAT, it works just fine till they encounter the NULL value.
I hope this quick video helps anyone who is working with the CONCAT function and NULL value.
Here are a few associated blog posts which you may find interesting.
- Activity Monitor and Running Query – SQL in Sixty Seconds #115
- Email an Execution Plan – SQL in Sixty Seconds #114
- Execution Plan – Estimated vs Actual – SQL in Sixty Seconds #113
- What Happens If the Clustered Index is Disabled? – Interview Question of the Week #291
- Nonclustered Primary Key – SQL in Sixty Seconds #119
- When was Stored Procedure Last Compiled? – Interview Question of the Week #292
- Recent Execution of Stored Procedure – SQL in Sixty Seconds #118
- Full-Screen Execution Plan – SQL in Sixty Seconds #117
- Recover Crashed Query in SSMS – SQL in Sixty Seconds #116
If you like the video, please do not forget to subscribe to my youtube channel. Let me know if you have any other SSMS tip which you think help the larger community.
Reference: Pinal Dave (https://blog.sqlauthority.com)