Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: How to create a duplicate of a table without copying the data

Re: How to create a duplicate of a table without copying the data

From: Winnie Liu <oracle_dba_at_zdnetmail.com>
Date: Fri, 4 Sep 1998 17:15:15 -0700
Message-ID: <6spvhv$b6o@dfw-ixnews6.ix.netcom.com>


Use this

create table <new table>
as select * from <old table>
where 1=2;

in this case, only the table structure will go to the new table, but no row will go to the new one

Winnie

Vishy Ram wrote in message <01bdd85c$002ecd60$6b6295cc_at_vishy>...
>Hi Gurus,
> I am trying to create a temptable which is a duplicate of an existing
>table. However
>I do not want any data from the master. Just the table definition of the
>master. So I
>cannot use the Create Table as Select clause. Can anyone suggest a better
>way.
>
>Thanks in advance.
Received on Fri Sep 04 1998 - 19:15:15 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US