上一页 1 ··· 94 95 96 97 98 99 100 101 102 ··· 203 下一页
摘要: select emp.*,dept.* from tb_emp03 emp,tb_dept03 dept where emp.deptno=dept.id -- 不加hint SQL> select emp.*,dept.* from tb_emp03 emp,tb_dept03 dept wher 阅读全文
posted @ 2020-01-28 17:08 逆火狂飙 阅读(188) 评论(0) 推荐(0)
摘要: 索引全扫描的执行计划: SQL> select max(age) from tb_emp04 emp; 已用时间: 00: 00: 00.01 执行计划 Plan hash value: 2758779452 | Id | Operation | Name | Rows | Bytes | Cost 阅读全文
posted @ 2020-01-28 16:52 逆火狂飙 阅读(499) 评论(0) 推荐(0)
摘要: 先准备实验材料: 一张表及其数据: create table tb_emp04( id number(8,0) primary key, name nvarchar2(20), age number(2,0) ) insert into tb_emp04 select rownum,dbms_ran 阅读全文
posted @ 2020-01-28 12:49 逆火狂飙 阅读(452) 评论(0) 推荐(0)
摘要: SQL> select /*+ leading(emp,dept) usenl(emp) */ emp.*,dept.* from tb_emp03 emp,tb_dept03 dept where emp.deptno=dept.id; 执行计划 Plan hash value: 96039728 阅读全文
posted @ 2020-01-28 04:26 逆火狂飙 阅读(289) 评论(0) 推荐(0)
摘要: ln1~ln10的数值,精确到小数点后六位。 阅读全文
posted @ 2020-01-27 22:30 逆火狂飙 阅读(1370) 评论(0) 推荐(0)
摘要: 在数据库日新月异的时代,不实际跑跑,谁快谁慢还真不好说。 有这么一个员工表: create table tb_emp03( id number(8,0) primary key, name nvarchar2(60), salary number(5,0), deptno number(2,0) ) 阅读全文
posted @ 2020-01-27 21:23 逆火狂飙 阅读(253) 评论(0) 推荐(0)
摘要: Decode和case都可以实现SQL中的条件结构,下面为用法示例: select id,name,score,decode(floor(score/20),5,'A',4,'B',3,'C',2,'D','E') as grade from tb_score01 order by grade 运行 阅读全文
posted @ 2020-01-27 15:27 逆火狂飙 阅读(284) 评论(0) 推荐(0)
摘要: 转载节选自:https://bbs.csdn.net/topics/220059184 数据类型 参数 描述 char(n) n=1 to 2000字节 定长字符串,n字节长,如果不指定长度,缺省为1个字节长(一个汉字为2字节) varchar2(n) n=1 to 4000字节 可变长的字符串,具 阅读全文
posted @ 2020-01-25 17:44 逆火狂飙 阅读(1086) 评论(0) 推荐(0)
摘要: 笔者使用的环境: # 类别 版本 1 操作系统 Win10 2 数据库 Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production 3 硬件环境 T440p 4 内存 8G 有这样一张表: CREATE T 阅读全文
posted @ 2020-01-25 09:17 逆火狂飙 阅读(284) 评论(4) 推荐(0)
摘要: 有这样一张表: CREATE TABLE tb_sc ( id NUMBER not null primary key, studentid int not null, courseid int not null, score int not null ) 用以下语句给它充值十万条数据: Inser 阅读全文
posted @ 2020-01-24 19:04 逆火狂飙 阅读(861) 评论(0) 推荐(0)
上一页 1 ··· 94 95 96 97 98 99 100 101 102 ··· 203 下一页
生当作人杰 死亦为鬼雄 至今思项羽 不肯过江东