datetime DEFAULT CURRENT_TIMESTAMP : CURRENT_TIMESTAMP « Date Functions « SQL Server / T-SQL Tutorial






4> CREATE TABLE T (
5>     int1 int,
6>     bit1 bit NOT NULL DEFAULT 0,
7>     rvr1 timestamp,
8>     usr1 nvarchar(128) DEFAULT USER,
9>     createtime datetime DEFAULT CURRENT_TIMESTAMP
10> )
11> GO
1>
2> INSERT T (int1, bit1) VALUES (3, 1)
3> GO

(1 rows affected)
1> UPDATE T
2> set bit1 = 1
3> WHERE int1 = 2
4> GO

(0 rows affected)
1> drop table t;
2> GO
1>
2>








10.1.CURRENT_TIMESTAMP
10.1.1.select CURRENT_TIMESTAMP
10.1.2.SELECT @today = current_timestamp
10.1.3.CHECK (entered_date >= CURRENT_TIMESTAMP)
10.1.4.datetime DEFAULT CURRENT_TIMESTAMP