例如,我在表格行finish
中有值:
20-JAN-06;
21-SEP-06;
12-FEB-10;
15-MAR-09;
03-JUL-09;
23-JAN-09;
如何将它们与sysdate
进行比较?我知道这段代码不正确:
Select name from project where finish <= sysdate ;
答案 0 :(得分:1)
像这样的尝试我没有oracle来测试它
SELECT EMP_NAME, EMPNO
FROM EMP
WHERE TRUNC(START_DATE) = TRUNC(SYSDATE);
或
SELECT emp_name, empno
FROM emp
WHERE start_date >= TRUNC(SYSDATE)
and start_date < TRUNC(SYSDATE)+1
答案 1 :(得分:1)
答案 2 :(得分:1)
Select name
from project
where to_date(finish, 'DD-MON-YY') <= trunc(sysdate)