为什么我不能使用sql在表中输入这个日期? [英] Why can't I enter this date into a table using sql?
本文介绍了为什么我不能使用sql在表中输入这个日期?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
employee表的结构:
Structure of the employee table:
Name Null? Type
------------- -------- ------------
EMPLOYEE_ID NOT NULL NUMBER(38)
FIRST_NAME VARCHAR2(50)
LAST_NAME VARCHAR2(50)
EMAIL VARCHAR2(50)
DEPT_ID NUMBER(38)
SALARY NUMBER(38)
COMMISION_PCT FLOAT(126)
HIREDATE DATE
INSERT
语句:
insert into employees_table
values (05,'Sophie','Kuchinskey','sophiekuchinskey@yahoo.com',105,5000000,60,'20-sept-1994');
第1行出现错误: ORA-01841 :(完整)年份必须在-4713到+9999之间,并且不能为0
ERROR at line 1: ORA-01841: (full) year must be between -4713 and +9999, and not be 0
推荐答案
请将该日期转换为正确的日期格式
Please convert the date into correct date format
insert into employees_table values(05,'Sophie','Kuchinskey','sophiekuchinskey@yahoo.com',105,5000000,60,to_date('20-sep-1994','dd-Mon-YYYY'));
此外,您无法提供9月的月份.应该是9月.
Also you can't give month as sept . it should be sep.
这篇关于为什么我不能使用sql在表中输入这个日期?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文