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: Mark D Powell <Mark.Powell_at_eds.com>
Date: 3 Jun 2002 09:00:53 -0700
Message-ID: <2687bb95.0206030800.7d8ef075@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

Look up 'create table as select' in the SQL Manual; the statement is something like: create table x as select col1, col2, ... col_n from orig_table where ..... You can apply tablespace and storage parameters. The manual will show you the full syntax.

HTH -- Mark D Powell -- Received on Mon Jun 03 2002 - 11:00:53 CDT

Original text of this message

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