Home » SQL & PL/SQL » SQL & PL/SQL » Replicate Table Structure
Replicate Table Structure [message #239870] Wed, 23 May 2007 09:04 Go to next message
marisa
Messages: 4
Registered: April 2007
Junior Member
hi guys is there any way to create table structure from existing

table without the table data of existing table.


please help me with this


thanks in advance



Re: Replicate Table Structure [message #239873 is a reply to message #239870] Wed, 23 May 2007 09:19 Go to previous messageGo to next message
BlackSwan
Messages: 25046
Registered: January 2009
Location: SoCal
Senior Member
CREATE TABLE NEW_TABLE AS SELECT * FROM OLD_TABLE WHERE 1 = 2
Re: Replicate Table Structure [message #239959 is a reply to message #239873] Wed, 23 May 2007 14:10 Go to previous messageGo to next message
DreamzZ
Messages: 1666
Registered: May 2007
Location: Dreamzland
Senior Member
CREATE TABLE ABC
AS
SELECT * FROM ABC_123
WHERE ROWNUM<1;
Re: Replicate Table Structure [message #239967 is a reply to message #239959] Wed, 23 May 2007 14:40 Go to previous message
Michel Cadot
Messages: 64139
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
CREATE TABLE ABC
AS
SELECT * FROM ABC_123
WHERE ROWNUM<0;

CREATE TABLE ABC
AS
SELECT * FROM ABC_123
WHERE 2=3;

...

We can repeat ab finitum examples with impossible condition this does not bring anything more than the first answer.

Regards
Michel
Previous Topic: multiple values in a string causing stored procedure to hang even after commiting the data
Next Topic: Difference between inner join and equijoin
Goto Forum:
  


Current Time: Thu Dec 08 18:41:26 CST 2016

Total time taken to generate the page: 0.10494 seconds