Oracle的Insert语句报错:无效的月份
以下几种格式均报:无效的月份
INSERT INTO Livell.Product (ProductID,ProductName,AddTime) VALUES(1,'123123',TO_DATE('05-MAY-2012','DD-MON-YYYY'))
INSERT INTO Livell.Product (ProductID,ProductName,AddTime) VALUES(1,'123123',TO_DATE('05-05-2012','DD-MON-YYYY'))
INSERT INTO Livell.Product (ProductID,ProductName,AddTime) VALUES(1,'123123',TO_DATE('2012-05-05','YYYY-MON-DD'))
可以使用 update props$ set value = 'YYYY-MM-DD' where parameter = 'NLS_DATE_FORMAT';先处理明仿迅一下大祥
重启数激此据库 然后插入
INSERT INTO Livell.Product (ProductID,ProductName,AddTime) VALUES(1,'123123'者灶和,TO_DATE('05-MAY-2012','dd-mon-yyyy','nls_date_language=American'))
INSERT INTO Livell.Product (ProductID,ProductName,AddTime) VAL‘首盯ES(1,'123123'辩敬,TO_DATE('05-05-2012','DD-MM-YYYY'))
INSERT INTO Livell.Product (ProductID,ProductName,AddTime) VALUES(1,'123123',TO_DATE('2012-05-05','YYYY-MM-DD'))