1赚爵、DATE_SUB( date, INTERVAL expr type );
例
select sysdate, DATE( sysdate, INTERVAL 2 DAY ) as dual;
2棉胀、last_day();
例
select * from emp_hyh where hire=last_day( hire )-2;
//每個月前三天入職的人員
3、extract( unit from date ) -----> 用于返回日期/時間的單獨部分, unit可以是時分秒等等
例
select * from emp_hyh where extract( year from sysdate )-extract( year from hiredate ) >12;
//查詢12年前入職的人員
4冀膝、substr( 字符串, 截取開始位置, 截取長度 )
例
select upper( substr( ename, 1, 1 ) ) || lower( substr( ename, 2, length( ename ) ) ) from emp_hyh
//返回員工姓名唁奢,首字母大寫