Anybody know a way to make a varchar field not allow duplicates besides
making it a primary key?hi adam,
how about creating unique constraint on the column.
Ex:
create table #t(col1 varchar(50) unique)
insert into #t values('a')
insert into #t values('b')
insert into #t values('a') -- error
-- Vishal
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment