1
votes
create table hdate
(
hidate Date
);

insert into hdate values(2019-04-23);

how shall I solve this problem?

1

1 Answers

2
votes

insert into hdate values(2019-04-23);

You must pass the value using single quotes along with proper format mask and convert it into date using TO_DATE:

insert into hdate values( TO_DATE('2019-04-23', 'YYYY-MM-DD') );

Or, better use ANSI Date literal which uses a fixed format 'YYYY-MM-DD':

insert into hdate values(DATE '2019-04-23');