Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SAP Sybase SQL Anywhere 16.0 (中文) » SQL Anywhere 服务器 - SQL 用法 » SQL 方言和兼容性 » 与 Transact-SQL 兼容的数据库 » 特殊 IDENTITY 列

 

使用 @@identity 检索 IDENTITY 列值

当您第一次将行插入表中时,IDENTITY 列将被分配值 1。对于每次后继的插入,该列的值都会递增 1。最近插入标识列的值可在 @@identity 全局变量中提供。

 另请参见