如何获得 sql - ORACLE 中两个日期之间的年差?
How to get the difference in years between two dates in sql - ORACLE?
我想在 Oracle 中进行查询,以显示员工在 'IT DEPARTMENT' 中并且工作时间在 3 到 8 年之间的所有记录。
我有 table:
IT 部门 在 table 中的 ID 为 60,如何使用 table 中的记录进行查询?
请帮忙! :(
试试这个:
select * from job_history
where end_date - start_date between 1095 and 2920
and department_id = 60;
1095 = 3*365
2920 = 8*365
我想在 Oracle 中进行查询,以显示员工在 'IT DEPARTMENT' 中并且工作时间在 3 到 8 年之间的所有记录。
我有 table:
IT 部门 在 table 中的 ID 为 60,如何使用 table 中的记录进行查询? 请帮忙! :(
试试这个:
select * from job_history
where end_date - start_date between 1095 and 2920
and department_id = 60;
1095 = 3*365
2920 = 8*365