oracle 常用sql
时间:2014-06-09 20:00:42
收藏:0
阅读:211
--1,随机抽取一条数据
select column from (select * from table order by dbms_random.value ) where rownum = 1;
--2,选取一个表中的重复数据
select column from table group by column having count(*) > 1
--3,日期截取
1)如2012-4-27 9:20:22只截取后面的时分秒
select to_char(sysdate,‘hh24:mi:ss‘) from dual
评论(0)