In Oracle, as I'm using the GUI to create tables, I can also look at older tables and the SQL it would take to create those tables again. Does MSSQL 2005 have this same feature anywhere in the Management Studio? I ask because I need to create a large number of tables that already exist in this database in a different place, so it would be nice if I could just view the script it would take to create these tables rather than having to write all the script from scratch myself. Any help would be appreciated.
MSSQL View SQL from GUI
Collapse
X
-
Tags: None
-
Open Management Studio. Connect to your server. Go to your database. Expand Tables. Right Click on the table that you want. Choose CREATE to. Then choose where you want the script to go.Originally posted by thecolonelIn Oracle, as I'm using the GUI to create tables, I can also look at older tables and the SQL it would take to create those tables again. Does MSSQL 2005 have this same feature anywhere in the Management Studio? I ask because I need to create a large number of tables that already exist in this database in a different place, so it would be nice if I could just view the script it would take to create these tables rather than having to write all the script from scratch myself. Any help would be appreciated.
How many tables are we talking about? It might be faster if you just copy the database and truncate all the tables. Or go to the source database and do a
-- CKCode:select * into newdb..newtable from olddb..oldtable where 1 = 2
Comment