如何查看序列的定义?

时间:2015-05-17 16:39:31

标签: sql sql-server tsql sql-server-2012 tsql-sequence

我想通过查询检索序列的定义。我已经用触发器做了这个:

USE dbName 
SELECT c.text FROM sys.syscomments c 
INNER JOIN (
    SELECT object_id FROM SYS.triggers WHERE name = 'triggerName'
) t ON c.id = t.object_id

1 个答案:

答案 0 :(得分:0)

您可以看到有关所有序列的信息,如下所示:

SELECT * FROM sys.sequences