SQL Server / TSQL Tutorial Scenario:
If you have noticed the insert statement, In First Record I have put both Null values for FirstName and Last Name. In 2nd record I used the value 'Aamir' for first name and Null for Last Name. In 3rd record vice versa of 2nd record. From here what we understand that the unique constraint is working on both column values. As long as the combined value from both columns is unique, it is going to let us insert even one of them is null.
Link to scripts used in SQL Server / TSQL Tutorial Video
http://www.techbrothersit.com/2016/05...
Check out our website for Different SQL Server, MSBI tutorials and interview questions
such as SQL Server Reporting Services(SSRS) Tutorial
SQL Server Integration Services(SSIS) Tutorial
SQL Server DBA Tutorial
SQL Server / TSQL Tutorial ( Beginner to Advance)
http://www.techbrothersit.com/
On this page of the site you can watch the video online How to create Unique Constraint on Multiple Columns in SQL Server - SQL Server/TSQL Tutorial Part 96 with a duration of hours minute second in good quality, which was uploaded by the user TechBrothersIT 16 May 2016, share the link with friends and acquaintances, this video has already been watched 7,103 times on youtube and it was liked by 19 viewers. Enjoy your viewing!