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

Home
SQL Server / T-SQL Tutorial
1.Query
2.Insert Delete Update
3.Table
4.Table Join
5.Data Types
6.Set Operations
7.Constraints
8.Subquery
9.Aggregate Functions
10.Date Functions
11.Math Functions
12.String Functions
13.Data Convert Functions
14.Analytical Functions
15.Sequence Indentity
16.View
17.Index
18.Cursor
19.Database
20.Transact SQL
21.Procedure Function
22.Trigger
23.Transaction
24.XML
25.System Functions
26.System Settings
27.System Tables Views
28.User Role
29.CLR
SQL Server / T-SQL Tutorial » Data Types » bit 
5.2.2.bit type column with default value
6CREATE TABLE T (
7>     int1 int,
8>     bit1 bit NOT NULL DEFAULT 0,
9>     rvr1 timestamp,
10>     usr1 nvarchar(128DEFAULT USER,
11>     createtime datetime DEFAULT CURRENT_TIMESTAMP
12)
13> GO
1INSERT (int1VALUES (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
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.