November 27, 2008 at 11:17 pm
Hi
I have a table with col_id and col_emailid and i want to make col_emailid as unique. But ,
col_id col_emailid
should not be allowed but
1/2/3 kk@abc.com
should be allowed
i.e if col_id = 0 then col_emailid can exists twice
else not.
Please help as what can i do. I cant make the two col as unique key also
November 27, 2008 at 11:36 pm
I gave a thought a writing trigger but im not able to write it
can you please help me to write one
November 27, 2008 at 11:46 pm
in fact both of them ..
coz my first prob is trigger wont accept emailid .. from UI
November 27, 2008 at 11:56 pm
Use constraint
November 29, 2008 at 1:45 am
Same question asked and answered here
http://www.sqlservercentral.com/Forums/Topic610093-145-1.aspx
N 56°04'39.16"
E 12°55'05.25"
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply