Can we use PL/SQL key words as Coloumn Names [message #38965] |
Fri, 31 May 2002 04:43 |
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 |
|
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');
|
|
|