Click here to Skip to main content
15,891,184 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
ORA-00904: : invalid identifier 


What I have tried:

Copy Code
CREATE TABLE SCHEDULE
(Schedule_ID  NUMBER(15) CONSTRAINT Schedule_ID_pk PRIMARY KEY,   
Course_Name VARCHAR2(50) NOT NULL,   
Semester NUMBER(15) NOT NULL,  
Time TIME NOT NULL,
Day VARCHAR2(10) CHECK (Day IN ('Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday')),
Group VARCHAR2 (5) NOT NULL);
Posted
Updated 9-Jul-21 7:56am

1 solution

GROUP is a keyword: part of the SQL phrase "GROUP BY".

You cannot use any keyword as a table or column name without escaping the name every time you use it (for Oracle) enclosing it in double quotes.

Better idea: don't use keywords as column names
 
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