How can I get the definition of any Sequence
objects in SQL Server? For instance if I want to get the definition of View/Function/Procedure I would use below query
SELECT OBJECT_DEFINITION(tab.OBJECT_ID)
FROM SYS.OBJECTS tab
WHERE tab.[type] = 'V' /*FOR VIEW*/
SELECT OBJECT_DEFINITION(tab.OBJECT_ID)
FROM SYS.OBJECTS tab
WHERE tab.[type] = 'P' /*FOR PROCEDURE*/
SELECT OBJECT_DEFINITION(tab.OBJECT_ID)
FROM SYS.OBJECTS tab
WHERE tab.[type] = 'TR' /*FOR TRIGGER*/
Please let me know if we have similar options available to get the details for Sequence
objects