-2

I want to retrieve the definition of a sequence through a query. I have already done this with triggers:

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
sqluser
  • 5,502
  • 7
  • 36
  • 50

1 Answers1

0

You can see information about all sequences like this:

SELECT * FROM sys.sequences
ErikEJ
  • 40,951
  • 5
  • 75
  • 115