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
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