why is this sql create in error ? how to make it correct ? Error starting at line : 5 in command - CREATE TABLE MARKETING_CAMPAIGN( MACampID int, MACampName varchar(30) not null, MACampDescr varchar(100) not null, DiscountType varchar(100) null, MACampStartDate char(10) check (TO_DATE(MACampStartDate,'MM-DD-YYYY')) not null, MACampEndDate char(10) check (TO_DATE(MACampEndDate,'MM-DD-YYYY')) not null, PRIMARY KEY (MACampID) ) INSERT INTO MARKETING_CAMPAIGN(MACampID , MACampName ,MACampDescr ,DiscountType ,MACampStartDate , MACampEndDate )VALUES (1111, 'discount','This is discount', 'discount type1' ,'12-02-2021', '02-22-2022')
why is this sql create in error ? how to make it correct ?
Error starting at line : 5 in command -
CREATE TABLE MARKETING_CAMPAIGN(
MACampID int,
MACampName varchar(30) not null,
MACampDescr varchar(100) not null,
DiscountType varchar(100) null,
MACampStartDate char(10) check (TO_DATE(MACampStartDate,'MM-DD-YYYY')) not null,
MACampEndDate char(10) check (TO_DATE(MACampEndDate,'MM-DD-YYYY')) not null,
PRIMARY KEY (MACampID)
)
INSERT INTO MARKETING_CAMPAIGN(MACampID ,
MACampName ,MACampDescr ,DiscountType ,MACampStartDate ,
MACampEndDate )VALUES (1111, 'discount','This is discount', 'discount type1' ,'12-02-2021', '02-22-2022')
Error report -
ORA-00920: invalid relational operator
00920. 00000 - "invalid relational operator"
*Cause:
*Action:
Step by step
Solved in 2 steps with 1 images