Not Allowing Null Values in a Column : Nullable « Constraints « SQL Server / T-SQL






Not Allowing Null Values in a Column

 


5> CREATE TABLE T (
6>     int1 int,
7>     bit1 bit NOT NULL,
8>     varchar1 varchar(3),
9>     dec1 dec(5,2),
10>     cmp1 AS (int1 + bit1)
11> )
12> GO
1>
2> drop table t;
3> GO

 








Related examples in the same category

1.Add a nullable column
2.Changing a Column Definition: Make it Nullable