| title | @@DBTS (Transact-SQL) | Microsoft Docs | ||
|---|---|---|---|
| ms.custom | |||
| ms.date | 07/30/2017 | ||
| ms.prod | sql-non-specified | ||
| ms.reviewer | |||
| ms.suite | |||
| ms.technology |
|
||
| ms.tgt_pltfrm | |||
| ms.topic | language-reference | ||
| f1_keywords |
|
||
| dev_langs |
|
||
| helpviewer_keywords |
|
||
| ms.assetid | 91842ddd-91c0-4445-a03f-116f6bc991d0 | ||
| caps.latest.revision | 35 | ||
| author | BYHAM | ||
| ms.author | rickbyh | ||
| manager | jhubbard |
[!INCLUDEtsql-appliesto-ss2008-asdb-xxxx-xxx_md]
Returns the value of the current timestamp data type for the current database. This timestamp is guaranteed to be unique in the database.
Transact-SQL Syntax Conventions
@@DBTS varbinary
@@DBTS returns the last-used timestamp value of the current database. A new timestamp value is generated when a row with a timestamp column is inserted or updated.
The @@DBTS function is not affected by changes in the transaction isolation levels.
The following example returns the current timestamp from the [!INCLUDEssSampleDBnormal] database.
USE AdventureWorks2012;
GO
SELECT @@DBTS; Configuration Functions (Transact-SQL)
Cursor Concurrency (ODBC)
Data Types (Transact-SQL)
MIN_ACTIVE_ROWVERSION (Transact-SQL)