Click here to Skip to main content
15,887,988 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I am writing following statement to create a table in oracle database but failed to create table. An error is generated called

ORA-00904: : invalid identifier

I had written following code to create table in oracle create table

SYSTEM.UserLogin (Online number(1) null , Role varchar2(15) null )

I am using Oracle 10g express edition.
Posted
Updated 21-Feb-12 5:20am
v3
Comments
krumia 21-Feb-12 13:17pm    
When submitting the question, it's great if you could format your code using the pre tags provided by the editor.

1 solution

If you Googled ORA-00904 and followed the first link, you would have seen this:
ORA-00904:	string: invalid identifier

Cause:	                The column name entered is either missing or invalid.

Action:                 Enter a valid column name. A valid column name must 
                        begin with a letter, be less than or equal to 30 
                        characters, and consist of only alphanumeric characters
                        and the special characters $, _, and #. If it 
                        contains other characters, then it must be enclosed
                        in double quotation marks. It may not be a 
                        reserved word.

If you saw the last sentence "It may not be a reserved word", then you would have Googled "Oracle reserved words", and on the first link you would have seen that both role and online are reserved words.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900