上一页 1 ··· 167 168 169 170 171 172 173 174 175 ··· 177 下一页
摘要: SQL> select * from a1; ID NAME---------- ---------- 1 a 1 a 2 a 3 aSQL> select * from a2; ID---------- 2 3 2SQL> select * from a1 where id not... 阅读全文
posted @ 2014-01-03 09:21 czcb 阅读(293) 评论(0) 推荐(0) 编辑
摘要: ---取1到3位SQL> select job,substr(job,1,3) from emp;JOB SUBSTR--------- ------CLERK CLESALESMAN SALSALESMAN SALMANAGER MANSALESMAN SALMANAGER ... 阅读全文
posted @ 2014-01-03 08:39 czcb 阅读(300) 评论(0) 推荐(0) 编辑
摘要: select * from dt where dw_data=to_date(to_char(sysdate-1,'YYYY-MM-DD'),'YYYY-MM-DD') ---取前一天日期SQL> select * from dt where dw_data=trunc(sysdate-1,'d... 阅读全文
posted @ 2014-01-02 11:03 czcb 阅读(202) 评论(0) 推荐(0) 编辑
摘要: SQL> select data,translate(data,'0123456789','##########') as num1, replace(translate(data,'0123456789','##########'),'#','') as num2 from v;DATA ... 阅读全文
posted @ 2014-01-02 08:58 czcb 阅读(627) 评论(0) 推荐(0) 编辑
摘要: SQL> select comm,nvl(comm,0)from emp; COMM NVL(COMM,0)---------- ----------- 0 300 300 500 500 0 1400 1400 ... 阅读全文
posted @ 2014-01-01 22:15 czcb 阅读(232) 评论(0) 推荐(0) 编辑
摘要: SQL> select * from (select ename,job from emp order by dbms_random.value() ) where rownum /ENAME JOB---------- ---------TURNER SALESMANCLARK ... 阅读全文
posted @ 2014-01-01 22:12 czcb 阅读(182) 评论(0) 推荐(0) 编辑
摘要: SQL> select ename,sal, case when sal = 4000 then 'OVERPAID' else 'OK' end as sal from emp; 2 3 4 ... 阅读全文
posted @ 2014-01-01 21:44 czcb 阅读(191) 评论(0) 推荐(0) 编辑
摘要: 使用||作为连接运算符SQL> select ename||CHR(32)||CHR(32)||'WORK AS A '||job as msg from emp;MSG-------------------------------SMITH WORK AS A CLERKALLEN WORK ... 阅读全文
posted @ 2014-01-01 21:41 czcb 阅读(148) 评论(0) 推荐(0) 编辑
摘要: SQL语句: SELECT /*+parallel(t1 16)*/ T1.DATA_DATE, T1.ACCT_NO, T1.ACCT_ORD, T1.ACCT_NO_PK, T1.ACCT_BAL, T1.D_CMP_BAL, T1.M_CMP_BAL, T1.... 阅读全文
posted @ 2013-12-31 10:02 czcb 阅读(530) 评论(0) 推荐(0) 编辑
摘要: SQL> select * from fxqd_list_20131115_new where (acct_no, oper_no, seqno, trans_amt) not in (select acct_no, oper_no, seqno, trans_amt ... 阅读全文
posted @ 2013-12-31 08:50 czcb 阅读(338) 评论(0) 推荐(0) 编辑
上一页 1 ··· 167 168 169 170 171 172 173 174 175 ··· 177 下一页