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

Home -> Community -> Usenet -> c.d.o.tools -> RE: 'DESC' as column name

RE: 'DESC' as column name

From: bryan munday <bardy_at_MailAndNews.com>
Date: Thu, 24 May 2001 06:19:54 -0400
Message-ID: <3B0FF0C2@MailAndNews.com>

You rally shouldn't use reservered words at all in tables whether it be for table name of column name. I would like to know how you managed to even create the column desc as this usuallyu results ina na invalid column name error as in:

create table event_codes (id VARCHAR2(10),NEWD VARCHAR2(30),DESC VARCHAR2(10))

                                                            *
ERROR at line 1:
ORA-00904: invalid column name

I would suggest dropping the table ans recreating it with a column name other
than DESC.

Bryan

>===== Original Message From "Mark Wallace" <*CaN NoT HAvE SpaM*@no.spam.man>



>Is 'DESC' (as in a abbr for description) a reserved word for a column name?
>
>I successfully create a table with a column called DESC, but as soon as I
>try to add data to the column if get the following error :
>
> 1 INSERT INTO SRC.EVENT_CODES (ID, DESC)
> 2 VALUES
> 3* ('BB', 'BATCH')
>SQL> /
>INSERT INTO SRC.EVENT_CODES (ID, DESC)
> *
>ERROR at line 1:
>ORA-01747: invalid user.table.column, table.column, or column specification
>
>The table definitly exist and has a column called DESC as shown below :
>SQL> desc EVENT_CODES;
> Name Null? Type
> ----------------------------------------- -------- ------------
>
> ID NOT NULL VARCHAR2(10)
> NEWD VARCHAR2(30)
> DESC VARCHAR2(10)
>
>Thanks
>Mark
>


 Get your FREE web-based e-mail and newsgroup access at:
                http://MailAndNews.com

 Create a new mailbox, or access your existing IMAP4 or  POP3 mailbox from anywhere with just a web browser.


Received on Thu May 24 2001 - 05:19:54 CDT

Original text of this message

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