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 -> Re: SQL help (create table)

Re: SQL help (create table)

From: george lewycky <gelewyc_at_nyct.com>
Date: 3 Jun 2002 07:49:58 -0700
Message-ID: <68aecc05.0206030649.33e43e9e@posting.google.com>


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&#8217;t copying the data or entire database but rather making an exact copy of a table&#8217;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

Original text of this message

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