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: Create table as ...

Re: Create table as ...

From: joachim Carlsson <joachim.carlsson_at_neurope.ikea.com>
Date: 1998/01/20
Message-ID: <01bd258d$ad923aa0$48073e0a@pc166-cchbg.neurope.ikea.com>#1/1

You have to create a table something like

create table a as select * from b where 2=1; insert into a select * from b order by something;

/Joachim

Wei Tang <wtang_at_cs.ualberta.ca> wrote in article <69ovpt$qdj$1_at_scapa.cs.ualberta.ca>...
> Hi, there:
>
> I wonder if anyone of you ever used "create table as subquery" statement
> to create a table.
>
> I have a table called test:
> create table test(
> name varchar2(10),
> ID number);
>
> But I cannot use the following statement:
> create table test_bak as select * from test order by ID;
>
> It said: ORA-00933: SQL command not properly ended.
>
> When I remove the "order by" clause, everything is fine. I couldn't find
> any documentation saying "order by" is not supported in "create table
> as..." statement.
>
> What's wrong with that?
>
> I need your expertise in a rush. Please help me.
>
> Thanks.
>
>
  Received on Tue Jan 20 1998 - 00:00:00 CST

Original text of this message

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