Reputation: 21
I am trying to make records in Oracle APEX. Below is what I have so far:
INSERT INTO Orders VALUES ( 2783764598765, 8931, 20220101, 20220113 );
The last two values are supposed to be in the date format, but I keep getting an error message.
Upvotes: 0
Views: 70
Reputation: 521178
You need to use valid date literals, such as:
INSERT INTO Orders (col1, col2, date1, date2)
VALUES (2783764598765, 8931, date '2022-01-01', date '2022-01-13');
Note also that I suggest above explicitly listing out which columns you want to target with your insert. This is best practice when doing an insert.
Upvotes: 4