T-SQL Table Creates ???????????

  • ANYONE know of a way to generate Create Table scripts from T-SQL for tables that already exist in the database?? Withut going to Enterprise Manager?

    Thanks !!!!

    Jim

  • Be easy to write something. You could query systables and syscolumns to get the data.

    Or you could use sp_OACreate to create a DMP object and use that.

    Steve Jones

    steve@dkranch.net

  • I have some partial unfinished code that does that but have not had time to finish it. Querying the nsystables and syscolumns also does not give you the nice index pieces or the filegroups locations and many other buzz pieces that EM gives you. Have not tried sp_OACreate and may do the job but if I get a chance I take a look at my code again in the next few days.

    "Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply