Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL help (create table)
Jean-Baptiste Jacquemard <jb.jacquemard_at_pollak-prebon.fr> wrote in message news:<3CFB35B7.324F0D0D_at_pollak-prebon.fr>...
> Hello
> I'd like to know if it is possible to create a table where column names are the result of a select.
> Something like : create table new_table (select column from table)
> And if yes, how do I specify data types ? Is there a default data type ?
> Thanks a lot
try this, i used this to copy the ra_customers_interface table structure into another table name for testing
George Lewycky
Creating a duplicate TABLE of an existing Table This isn’t copying the data or entire database but rather making an exact copy of a table’s structure to test a load or copy the data into.
Create Table <newtablename> AS Select * from <source or original tablename>;Example:
SQL> create table temp_cust_int AS Select * from ra_customers_interface;Received on Mon Jun 03 2002 - 09:49:58 CDT