0

Any idea why I am getting the below error while creating table on Oracle DB ?

SQL

create table tst(01_ITEM varchar2(100) );

Error Error report -

ORA-00904: : invalid identifier
00904. 00000 -  "%s: invalid identifier"
*Cause:    
*Action:
1
  • 2
    An identifier (the column name) can't start with a digit. (Unless delimited as "01_ITEM", but I'd chose another column name.) Commented Sep 14, 2021 at 7:45

1 Answer 1

1

Oracle database object names cannot begin with a digit. You should avoid creating such column names. If you must do this, then escape the column name using double quotes:

CREATE TABLE tst ("01_ITEM" varchar2(100));
Sign up to request clarification or add additional context in comments.

1 Comment

It should be noted, that quotes not only allow additional characters inside the identifier, but also keeps identifier's case.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.