oracle面试题[关于case when的用法]
表中有A B C三列,用SQL语句实现:当A列大于B列时选择A列否则选择B列,当B列大于C列时选择B列否则选择C列declare v_sal number:=2000; v_tax number; begin case when v_sal<1500 th...
Oracle LEFT JOIN中ON条件与WHERE条件的区别
1、创建测试数据:SQL> create table t1 as select * from scott.emp;Table created.SQL> create table t2 as select * from scott.dept;Table created.SQL> 2、以下为使用where的查询...
sqlldr导入带有双引号的txt文件
1、源数据:data.txtname log_times"aa","2013-2-4 23:42:29""bb","2013-2-4 23:23:07""cc","2013-2-4 23:29:01""dd","2013-2-4 23:18:26""ee","2013-2-9 12:37:09""ff","2013-2-9 12:27:25""gg","2013-2-9 ...
ORACLE中的KEEP()使用方法
DROP TABLE test;create table test (peer_id number,log_time date,action varchar2(20),cause varchar2(20));insert into test VALUES (1,sysdate-4,'connect','连接');insert into test VALUES (1,sysdate-9999,'...