hello friends,
Here i am sharing scripts which can be useful to us in our developement
CREATE TABLE [dbo].[testUnique](
[col1] [varchar](50) NULL,
[ID] [int] IDENTITY(1,1) NOT NULL,
) ON [PRIMARY]
CREATE UNIQUE INDEX IX_testUnique ON testUnique(col1)
WHERE col1 IS NOT NULL –-Here we can set any value to which we want to allow multiple value
Insert into testUnique(col1)
values ('a'),(null),(null)