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

Home -> Community -> Usenet -> c.d.o.misc -> Copying the structure

Copying the structure

From: <pankaj_wolfhunter_at_yahoo.co.in>
Date: 24 Apr 2006 21:51:58 -0700
Message-ID: <1145940718.499857.315340@t31g2000cwb.googlegroups.com>


Greetings,

                I have a table as

table1
ID INTEGER
NAME VARCHAR2(50)
DOJ TIMESTAMP
.....

I want to create another table (table2) with the same structure as table1 but the DOJ
datatype has to be changed to NUMBER(5,4)

table2
ID INTEGER
NAME VARCHAR2(50)
DOJ NUMBER(5,4)
....

Can I do it in single select statement? Something related to

CREATE TABLE table2 AS SELECT * FROM table1 WHERE 1=0;

Any help would be appreciated?

TIA Received on Mon Apr 24 2006 - 23:51:58 CDT

Original text of this message

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