check constraints coded at the table level : Check Options « Constraints « SQL Server / T-SQL






check constraints coded at the table level

 

6>
7>
8> CREATE TABLE Billings
9> (BillingID       INT   NOT NULL IDENTITY PRIMARY KEY,
10> BillingTotal     MONEY NOT NULL,
11> PaymentTotal     MONEY NOT NULL DEFAULT 0,
12> CHECK ((BillingTotal >= 0) AND (PaymentTotal >= 0)))
13>
14> GO
1>
2> drop table Billings;
3> GO

 








Related examples in the same category

1.The syntax of a check constraint: CHECK (condition)
2.Blocking Empty and Missing Character Input
3.WITH CHECK OPTION says any INSERT or UPDATE statements must meet that where clause criteria
4.A statement that creates a table with two column-level check constraints
5.Mark constraint with nocheck when creating a constraint