Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Q: invalid table name "orders" ?

Re: Q: invalid table name "orders" ?

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Wed, 13 Oct 1999 17:00:33 -0400
Message-ID: <auYEOBsb9P+JyxHyS91FYBSYF+68@4ax.com>


A copy of this was sent to tedchyn_at_yahoo.com (if that email address didn't require changing) On Wed, 13 Oct 1999 16:57:50 GMT, you wrote:

>Sir: has any body seen this ? order is invalid table name and orders is
>valid table name. I tried this in nt and solaris and got the same error
>message.
>
>thanks in advance, ted chyn(tedchyn_at_yahoo.com)
>
>SQL> create table order(c1 varchar2(3));
>create table order(c1 varchar2(3))
> *
>ERROR at line 1:
>ORA-00903: invalid table name
>
>
>SQL> c/der/ders/
> 1* create table orders(c1 varchar2(3))
>SQL> /
>
>Table created.
>
>
>Sent via Deja.com http://www.deja.com/
>Before you buy.

there are lots of reserved words that won't work as table names:

tkyte_at_8i> create table select( x int ); create table select( x int )

             *
ERROR at line 1:
ORA-00903: invalid table name

for example. ORDER (as in ORDER BY) is one of them.

Interestingly, some words you would assume are reserved are not reserved but they are keywords. for example:

tkyte_at_8i> create table commit( x int );

Table created.

but I would recommend NOT using keywords either -- causes confusion and some tools might reject them anyway.

--
See http://osi.oracle.com/~tkyte/ for my columns 'Digging-in to Oracle8i'... Current article is "Part I of V, Autonomous Transactions" updated June 21'st  

Thomas Kyte                   tkyte_at_us.oracle.com
Oracle Service Industries     Reston, VA   USA

Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Wed Oct 13 1999 - 16:00:33 CDT

Original text of this message

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