Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

COPY TABLE STUCTURE IN SQL

Status
Not open for further replies.

mabaulza

IS-IT--Management
Oct 25, 2004
12
0
0
GB
Hi,

does anyone know how to copy a Tables sturcture using SQL?!?!?!

 
If you just want the columns:

Code:
SELECT * INTO new_table
FROM old_table
WHERE 1 = 0

If you need to copy the constraints (PKs, CHECKs etc) then your best bet is to script the old table, either from EM or the QA object browser, edit the object names and execute it.

--James
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top