views:

24

answers:

1

Hello.
If I run the following script

SELECT so.Name, sc.Text
FROM syscomments sc JOIN sysobjects so ON sc.ID = so.ID

I will get all the create procedure/function scripts. Is there something like this for tables, indexes, keys, and triggers?
Thank you for your help!

+1  A: 

Nothing inbuilt.

To do it in T-SQL You'd need to find or write your own script. Example here that might get you started.

Martin Smith