| description | @@DBTS (Transact-SQL) | ||
|---|---|---|---|
| title | DBTS (Transact-SQL) | ||
| ms.custom | |||
| ms.date | 09/18/2017 | ||
| ms.prod | sql | ||
| ms.prod_service | database-engine, sql-database | ||
| ms.reviewer | |||
| ms.technology | t-sql | ||
| ms.topic | reference | ||
| f1_keywords |
|
||
| dev_langs |
|
||
| helpviewer_keywords |
|
||
| ms.assetid | 91842ddd-91c0-4445-a03f-116f6bc991d0 | ||
| author | cawrites | ||
| ms.author | chadam |
[!INCLUDE SQL Server SQL Database]
This function returns the value of the current timestamp data type for the current database. The current database will have a guaranteed unique timestamp value.
Transact-SQL Syntax Conventions
@@DBTS
[!INCLUDEsql-server-tsql-previous-offline-documentation]
varbinary
@@DBTS returns the last-used timestamp value of the current database. An insert or update of a row with a timestamp column generates a new timestamp value.
Changes to the transaction isolation levels do not affect the @@DBTS function.
This 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)