Oracle常用sql语句整理

124>.取时间点的秒的写法:

select to_char(sys2003-10-17,?ss?) from dual; 125>.取时间点的日期的写法:

select trunc(sys2003-10-17) from dual;

126>.取时间点的时间的写法:

select to_char(sys2003-10-17,?hh24:mi:ss?) from dual; 127>.日期,时间形态变为字符形态

select to_char(sys2003-10-17) from dual; 128>.将字符串转换成日期或时间形态:

select to_2003-10-17(?2003/08/01?) from dual; 129>.返回参数的星期几的写法:

select to_char(sys2003-10-17,?d?) from dual; 130>.返回参数一年中的第几天的写法:

select to_char(sys2003-10-17,?ddd?) from dual;

联系客服:779662525#qq.com(#替换为@) 苏ICP备20003344号-4