Is there a way within the Manager to copy TableA in to a new TableB within the same database? I have a table that is very similar to a new one I need to create. It would be nice if there was a copy/paste/rename feature with in the manager. Can this be done? Thanks, Tom Woods
You may be able to do this with the import/export wizard, however I think it would be much easier to use a query window and say: SELECT * INTO new_table FROM old_table WHERE 1 = 0; This will copy the structure but not the data. You will still need to re-create indexes, constraints, etc. A "Tom Woods" wrote in message news:OFx7tLnnIHA.5472@TK2MSFTNGP03.phx.gbl... > Is there a way within the Manager to copy TableA in to a new TableB within > the same database? > > I have a table that is very similar to a new one I need to create. It > would be nice if there was a copy/paste/rename feature with in the > manager. > > Can this be done? > > Thanks, > Tom Woods >
Another easy thing to do is to right-click the table name in Object Explorer, select Script Table As > Create To > and then just grep/replace the table names... A "Tom Woods" wrote in message news:OFx7tLnnIHA.5472@TK2MSFTNGP03.phx.gbl... > Is there a way within the Manager to copy TableA in to a new TableB within > the same database? > > I have a table that is very similar to a new one I need to create. It > would be nice if there was a copy/paste/rename feature with in the > manager. > > Can this be done? > > Thanks, > Tom Woods >
Thank you for your suggestions. I ended up using the "Create To" method and then running the sql script. I had never done this before so I was a little wary of running the script. Thanks, Tom "Aaron Bertrand [SQL Server]" <ten.xoc@dnartreb.noraa> wrote in message news:266FBA69-BEAA-4C50-BCEB-0033DCF25867@microsoft.com... > Another easy thing to do is to right-click the table name in Object > Explorer, select Script Table As > Create To > and then just grep/replace > the table names... > > A > > > > > > "Tom Woods" wrote in message > news:OFx7tLnnIHA.5472@TK2MSFTNGP03.phx.gbl... >> Is there a way within the Manager to copy TableA in to a new TableB >> within the same database? >> >> I have a table that is very similar to a new one I need to create. It >> would be nice if there was a copy/paste/rename feature with in the >> manager. >> >> Can this be done? >> >> Thanks, >> Tom Woods >>