[thelist] [tip] duplicate a table structure

Joshua Olson joshua at waetech.com
Sun Oct 12 22:29:06 CDT 2003


From: "rudy" <rudy937 at rogers.com>
Sent: Sunday, October 12, 2003 11:12 PM


>    SELECT *
>     INTO newtable
>     FROM oldtable
>       where 1=0
>
> no subsequent truncate required

Nice one... doesn't use TOP, which is good.  I guess, therefore,  your
solution would work on more platforms?

To Rudy, Ken, Paul... I can always count on you three (at least) to turn my
tips into swiss cheese.  My hat's tipped to y'all.

> who uses EM for this type of stuff anyway?   QA rulez!!

Sure.

<tip type="SQL" author="Joshua Olson">
In EM, you can cut'n'paste column definitions from one table to another just
like you'd copy rows in a spreadsheet.  Highlight a couple rows, ctrl-c,
change windows, highlight insertion point, ctrl-v.

If you prefer the GUI over scripting then you may find this helpful.
</tip>

<><><><><><><><><><>
Joshua Olson
Web Application Engineer
WAE Tech Inc.
http://www.waetech.com
706.210.0168



More information about the thelist mailing list