Skip to content

Latest commit

 

History

History
59 lines (44 loc) · 2.01 KB

File metadata and controls

59 lines (44 loc) · 2.01 KB
title DBTS (Transact-SQL)
description @@DBTS (Transact-SQL)
author markingmyname
ms.author maghan
ms.date 09/18/2017
ms.prod sql
ms.technology t-sql
ms.topic reference
f1_keywords
@@DBTS_TSQL
@@DBTS
helpviewer_keywords
@@DBTS function
timestamp data type
dev_langs
TSQL

@@DBTS (Transact-SQL)

[!INCLUDE SQL Server Azure SQL Database Azure SQL Managed Instance]

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.

Topic link icon Transact-SQL Syntax Conventions

Syntax

@@DBTS  

[!INCLUDEsql-server-tsql-previous-offline-documentation]

Return types

varbinary

Remarks

@@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.

Examples

This example returns the current timestamp from the [!INCLUDEssSampleDBnormal] database.

USE AdventureWorks2012;  
GO  
SELECT @@DBTS;  

See also

Configuration Functions (Transact-SQL)
Cursor Concurrency (ODBC)
Data Types (Transact-SQL)
MIN_ACTIVE_ROWVERSION (Transact-SQL)