我有oracle数据库表,在我的表之后我想通过java将数据插入到我的表中,但它显示ORA-01843:不是有效月份
POLICY_NO NOT NULL VARCHAR2(20)
INSURED_NAME VARCHAR2(20)
POLICY_START_DATE DATE
POLICY_END_DATE DATE
CLAIM_STATUS VARCHAR2(20)
NCB_PER VARCHAR2(10)
insetIntoDBTable = "INSERT INTO details " + "VALUES ('1800/A123451','Sajid','1/1/2016','4/6/2016','policy live','90%')";
答案 0 :(得分:3)
您需要to_date:
INSERT INTO details VALUES ('1800/A123451','Sajid', to_date('1/1/2016', 'dd/mm/yyyy'),to_date('4/6/2016', 'dd/mm/yyyy'),'policy live','90%')