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

Home -> Community -> Usenet -> c.d.o.tools -> Re: how to copy the table defination

Re: how to copy the table defination

From: Thomas J. Kyte <tkyte_at_us.oracle.com>
Date: 2000/03/02
Message-ID: <89lnn2$e2s$1@nnrp1.deja.com>#1/1

In article <89m55b$t1$1_at_news.vsnl.net.in>,   "sachh" <sachh_at_bigfoot.com> wrote:
> I want to create the table identical to other table with populating
 it .
> Is there any way round to do it?
> I had tried create table x as select * from y;
> but that populates the table x also.
> i want to create only table.
> regards
> sachin
>
>

create table x as select * from y WHERE 1=0;

will create a structurally similar table (no constraints, indexes, etc).

--
Thomas Kyte                              tkyte_at_us.oracle.com
Oracle Service Industries
http://osi.oracle.com/~tkyte/index.html
--
Opinions are mine and do not necessarily reflect those of Oracle Corp


Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Thu Mar 02 2000 - 00:00:00 CST

Original text of this message

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