Hi, I want view the create script for a table(which is already created) as below create table my_table ( col1 varchar(10), col2 varchar(10), . . . ) I am using **sp_helptext** and it is working for only Views and Stored_Procs. I need similar functionality for view Table Script (with Indexes) Thankx
There are lots and lots of examples of this available online already. Try a google search for "generate create table script sql server". Result #2 is pretty good. If you get stuck implementing any of the suggestions I'm happy to help out.