How do I add a check constraint that 
Author Message
 How do I add a check constraint that
Hi,
How do I add a check constraint that checks for the field to be inserted
NOT to be in the table already?
Ernesto


Thu, 05 Dec 2002 03:00:00 GMT
 How do I add a check constraint that

A check constraint cannot compare against other data in the table. You'll
need a UNIQUE constraint, which will build a unique index automatically.

HTH

--
Kalen Delaney
MCSE, SQL Server MCT, MVP
www.InsideSQLServer.com
Feed Someone for Free Today:
     www.TheHungerSite.com


Quote:
> Hi,
> How do I add a check constraint that checks for the field to be inserted
> NOT to be in the table already?
> Ernesto



Thu, 05 Dec 2002 03:00:00 GMT
 How do I add a check constraint that
Sounds like you need a column uniqueness constraint instead of a check
constraint.
Check constraints do not permit selects


Quote:
> Hi,
> How do I add a check constraint that checks for the field to be inserted
> NOT to be in the table already?
> Ernesto



Fri, 06 Dec 2002 03:00:00 GMT
 
 [ 3 post ] 

 Relevant Pages 

1. Column check constraint vs table check constraint

2. Change table check constraint to column check constraint?

3. How to add the check-Constraints on table??

4. adding check constraint to column

5. add check constraint...

6. how to add check constraint to existing column

7. Add check constraint bug

8. add a check constraint to an existing column

9. Check Constraint vs. Foreign Key Constraint

10. checking the violation of constraint with existing data (after enabling of the constraint)

11. check constraint or referential constraint

12. Check constraints over app based constraints


 
Powered by phpBB® Forum Software