Ayush Mahadik
Ayush Mahadik

Reputation: 1

SQL apex oracle error message ORA-00902: invalid datatype

CREATE TABLE sessions 
(
    Ses_Start TIME NOT NULL,
    Ses_Finish TIME NOT NULL,
    A_ID NUMBER(2) NOT NULL,
    Vl_ID NUMBER(4) NOT NULL,
    Expense_per_head NUMBER(3) NOT NULL,

    CONSTRAINT pk_sessions PRIMARY KEY(A_ID, Vl_ID) 
); 

I'm trying to create the above table on oracle but I repeatedly get the following error

ORA-00902: invalid datatype

Any help would be appreciated!

Upvotes: 0

Views: 263

Answers (1)

pmdba
pmdba

Reputation: 7033

Oracle does not have a TIME data type. You must use DATE or TIMESTAMP, each of which includes both time and date components.

Upvotes: 1

Related Questions