check-constraint

CHECK CONSTRAINT on multiple columns

Hi, I use SQL Server 2008 I use a CHECK CONSTRAINT on multiple columns in the same table to try to validate data input. I receive an error: Column CHECK constraint for column 'AAAA' references another column, table 'XXXX'. CHECK CONSTRAINT does not work in this way. Any other way to implement this on a single table without ...

SQL Server 2008: Check constraints that guarantees that only one value in all rows is set to 1 and others are 0

There is a need to build constraint on the column that guarantees that only one value in all rows is 1 and all the others are 0. Solution with triggers exists but I would like to have something built in. Is such thing possible at all? ...