Home » SQL & PL/SQL » SQL & PL/SQL » Can we use PL/SQL key words as Coloumn Names
Can we use PL/SQL key words as Coloumn Names [message #38965] Fri, 31 May 2002 04:43 Go to next message
avdprasad
Messages: 2
Registered: May 2002
Junior Member
hi
I had a strange problem. I am writing an insert statement
INSERT into EMP(emp_name,emp_id,not,emp_designation) values('xxx',001,'problem','manager');

and found that one of the columns is 'not' . the compiler is giving me an error saying "NOT is not expected". How can I include it in insert statment.
Regards
Durga
Re: Can we use PL/SQL key words as Coloumn Names [message #38966 is a reply to message #38965] Fri, 31 May 2002 05:14 Go to previous message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
hi,
that really weird.
first becuase u cannot create a table with such a column!!!

SQL> ed
Wrote file afiedt.buf

1 create table emp3
2 (
3 ename varchar2(10),
4 eid number,
5 not varchar2(10),
6* desig varchar2(10))
7 /
not varchar2(10),
*
ERROR at line 5:
ORA-00904: invalid column name
.

*******************************************************
okay, considering that, such a table is created,
still you can avoid giving the column_names (that is not a goood practice, but no harm is done here).
like this

INSERT into EMP values('xxx',001,'problem','manager');
Previous Topic: what is the use of rowid?
Next Topic: triggers help URGENT!!
Goto Forum:
  


Current Time: Thu Apr 25 12:54:10 CDT 2024