--- title: "@@DBTS (Transact-SQL) | Microsoft Docs" ms.custom: "" ms.date: "09/18/2017" ms.prod: "sql" ms.prod_service: "database-engine, sql-database" ms.service: "" ms.component: "t-sql|functions" ms.reviewer: "" ms.suite: "sql" ms.technology: - "database-engine" ms.tgt_pltfrm: "" ms.topic: "language-reference" f1_keywords: - "@@DBTS_TSQL" - "@@DBTS" dev_langs: - "TSQL" helpviewer_keywords: - "@@DBTS function" - "timestamp data type" ms.assetid: 91842ddd-91c0-4445-a03f-116f6bc991d0 caps.latest.revision: 35 author: "edmacauley" ms.author: "edmaca" manager: "craigg" ms.workload: "On Demand" --- # @@DBTS (Transact-SQL) [!INCLUDE[tsql-appliesto-ss2008-asdb-xxxx-xxx-md](../../includes/tsql-appliesto-ss2008-asdb-xxxx-xxx-md.md)] Returns the value of the current **timestamp** data type for the current database. This timestamp is guaranteed to be unique in the database. ![Topic link icon](../../database-engine/configure-windows/media/topic-link.gif "Topic link icon") [Transact-SQL Syntax Conventions](../../t-sql/language-elements/transact-sql-syntax-conventions-transact-sql.md) ## Syntax ``` @@DBTS ``` ## Return types **varbinary** ## Remarks @@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. ## Examples The following example returns the current **timestamp** from the [!INCLUDE[ssSampleDBnormal](../../includes/sssampledbnormal-md.md)] database. ```sql USE AdventureWorks2012; GO SELECT @@DBTS; ``` ## See also [Configuration Functions (Transact-SQL)](../../t-sql/functions/configuration-functions-transact-sql.md) [Cursor Concurrency (ODBC)](../../relational-databases/native-client-odbc-cursors/properties/cursor-concurrency-odbc.md) [Data Types (Transact-SQL)](../../t-sql/data-types/data-types-transact-sql.md) [MIN_ACTIVE_ROWVERSION (Transact-SQL)](../../t-sql/functions/min-active-rowversion-transact-sql.md)