Mega Code Archive

 
Categories / MSSQL Tutorial / Data Types
 

Bit type column with default value

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