I believe this was sent to the Oracle group.
If that is true, the correct syntax is:
CREATE TABLE newTable AS
SELECT *
FROM oldTable
WHERE 1= 2;
This will create table newTable with the same columns as oldTable.
It will have no constraints or indexes. It will have zero(o) rows in it.
Hope this helps.
:-) Keith
-----Original Message-----
From: Jyothish John (J)
[mailto:oracledba-ezmlmshield-x3466500.[Email address protected]
Sent: Thursday, December 02, 2004 12:53 AM
To: LazyDBA Discussion
Subject: RE: How will you copy the structure of a table without copying
the data?
Can you try this?
SELECT *
INTO new_table
FROM old_table
WHERE 1=2;
Pls remember to set logging off before you try this.
Regards
J
-----Original Message-----
From: Dhanya
[mailto:oracledba-ezmlmshield-x3556427.[Email address protected]
Sent: Thursday, December 02, 2004 8:40 AM
To: LazyDBA Discussion
Subject: How will you copy the structure of a table without copying
the data?
How will you copy the structure of a table without copying the data?
--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com To unsubscribe:
see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com By using this list you agree
to these terms:http://www.lazydba.com/legal.html
==================================================================
This e-mail and its contents are subject to the Telkom SA Limited
e-mail legal notice available at
http://www.telkom.co.za/TelkomEMailLegalNotice.PDF
--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these terms:http://www.lazydba.com/legal.html
Oracle LazyDBA home page