I have a table in sql as follows:
CREATE TABLE Reserves(
sid INTEGER,
bid INTEGER,
day DATE,
PRIMARY KEY (sid, bid, day),
FOREIGN KEY (sid) REFERENCES Sailors,
FOREIGN KEY (bid) REFERENCES Boats
);
and I'm trying to insert into it:
INSERT INTO Reserves VALUES(22, 101, '01-01-1998');
But I get the error: ORA-01843: not a valid month
This is an Oracle db. I'm not sure what's wrong with my date format.
02-01-2012could be 2nd January 2012 or 1st February 2012, however20120102is always 2nd January 2012