bit type column with default value : bit « Data Types « SQL Server / T-SQL Tutorial






6> CREATE TABLE T (
7>     int1 int,
8>     bit1 bit NOT NULL DEFAULT 0,
9>     rvr1 timestamp,
10>     usr1 nvarchar(128) DEFAULT USER,
11>     createtime datetime DEFAULT CURRENT_TIMESTAMP
12> )
13> GO
1> INSERT T (int1) VALUES (1)
2> WAITFOR DELAY '00:00:01'
3> GO
1>
2> drop table t;
3> GO








5.2.bit
5.2.1.bit type column
5.2.2.bit type column with default value
5.2.3.Count null bit1 values
5.2.4.Count non-null bit1 values