SELECT @today = current_timestamp : CURRENT_TIMESTAMP « Date Functions « SQL Server / T-SQL Tutorial






31> DECLARE @today datetime
32> SELECT @today = current_timestamp
33>
34> SELECT @today
35> SELECT CONVERT (varbinary(8), @today)
36> SELECT CONVERT (int, SUBSTRING (CONVERT (varbinary(8), @today), 1, 4))
37> SELECT CONVERT (int, SUBSTRING (CONVERT (varbinary(8), @today), 5, 4))
38> GO

-----------------------
2008-08-17 13:14:21.513

(1 rows affected)



--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------------------
0x00009AFB00DA2D56



(1 rows affected)

-----------
      39675

(1 rows affected)

-----------
   14298454

(1 rows affected)
1>








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