if OBJECT_ID('tempdb..#tem') is not null drop table #tem create table #tem (aa nvarchar(20))
alter table #tem add constraint UQ_aa unique (aa) insert into #tem(aa) values ('1') insert into #tem(aa) values (' ') insert into #tem(aa) values (' ')