码迷,mamicode.com
首页 > 其他好文 > 详细

151029

时间:2015-10-29 23:30:06      阅读:251      评论:0      收藏:0      [点我收藏+]

标签:

select t.*, b.bummc from t_hq_ryxx t,t_hq_bm b where t.bum = b.bumbm;

select * from t_hq_ryxx t full join t_hq_bm b on t.bum > b.bumbm;

select * from t_hq_ryxx a, t_hq_ryxx b where a.bum = b.bum and a.xingb = 1;

select to_number(123.456,999.999) from dual;

select abs(-100) from dual;--绝对值

select mod(9,3) from dual;--求余数

select ceil(11.5) from dual;--上限值

select floor(12.5) from dual;--下限值

select round(12.456,2) from dual;--四舍五入

select trunc(12.456,2) from dual;--截取

select xingm, length(xingm) from t_hq_ryxx; 

select xingm, substr(xingm,1,3) from t_hq_ryxx;

select concat(aas,concat(sadas,aasw)) from dual;

select as || eew || weq from dual;

select instr(adsdfdsfdfg,d,3) from dual;--查找字符串

select upper(assdsad),lower(ASFFA), initcap(are you bitch?) from dual;

select replace(asfafasd,fa,22) from dual;--查找替换

select rpad(aa,8,cd) from dual;

select lpad(sa,8,cd) from dual;

select trim(  sadfs  ) from dual;--去空格

select ltrim(   adad  ) from dual;

select rtrim(   adad  ) from dual;

select trim(both a from aasdasdaa) from dual;

select sysdate from dual;

select add_months(sysdate,-20) from dual;

select last_day(sysdate) + 12 from dual;

select cast(123as number) + 312 from dual;--转换

select cast(123 as varchar2(5)) from dual;

select cast(sysdate as varchar2(20)) from dual;

select to_char(sysdate,yyyy-mm-dd hh24:mi:ss) from dual;

select to_char(123.456,9999.9) from dual;

select to_date(2015-12-21 12:31:33,yyyy-mm-dd hh24:mi:ss) +1 from dual;

select nvl2(nianl,20,1000) from t_hq_ryxx;

select nvl(nianl,0) + gongz from t_hq_ryxx;

 

151029

标签:

原文地址:http://www.cnblogs.com/zhuxiaolin/p/4921989.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!