
oracle记忆
科学的发展-只不过是读大自然写的代码
科学的发展-只不过是读大自然写的代码
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
oracle记忆-行转列-
create table tb3(v1 int ,v2 int ,v3 int);insert into tb3(v1,v2,v3) values(1,1,1);insert into tb3(v1,v2,v3) values(1,2,1);insert into tb3(v1,v2,v3) values(1,3,1);insert into tb3(v1,v2,v3) values(2...原创 2020-03-20 21:21:56 · 108 阅读 · 0 评论 -
记忆-oracle-取前n条记录
1.准备create table tb4(id int,v1 int);insert into tb4(id,v1) values(1,11);insert into tb4(id,v1) values(2,12);2.实验实验 一select * from tb4实验 二select * from tb4 where rownum<=1...原创 2020-01-14 10:35:52 · 184 阅读 · 0 评论 -
oracle-with-简单应用
1.准备1.1 脚本create table tb4(id int,v1 int);insert into tb4(id,v1) values(1,11);insert into tb4(id,v1) values(2,12);select * from tb41.2 运行结果2.简单应用2.1 脚本with temptb4 as (select * ...原创 2020-01-14 10:19:14 · 154 阅读 · 0 评论 -
记忆-oracle-执行计划查看
1 数据创建create table test_index(id int primary key,v int )create index test_index_v_desc on test_index(v)2 数据输入declare a int:=0;begin while (a < 100) loop insert into test_index(id,...原创 2020-01-06 16:28:29 · 186 阅读 · 0 评论 -
记忆-oracle单行函数
1 概要类 名称 说明 字 符 函 数 ASCII(X) 返回字符X的ASCII码 CONCAT(X,Y) 连接字符串X和Y INSTR(X,STR[,START][,N) 从X中查找str,可以指定从start开始,也可以指定从n开始 LENGTH(X) 返回X的长度 LOWER(X) X转换成小写 ...原创 2019-12-31 16:43:11 · 136 阅读 · 0 评论 -
记忆-oracle多表查询
表1 连接语句 表2 条件 交叉连接 表名1 cross join 表2 自然连接 natural join using using(id) 外连接 左 left join on 右 right ...原创 2019-12-10 15:38:15 · 122 阅读 · 0 评论 -
记忆-oracle选择分支
开始 判断处理 其他 结束 if 条件 then else if 条件 then else end if case 变量 when 条件/值 then else end case loop exit when 条件 end loop while(条件) loop end loop...原创 2019-12-06 13:42:59 · 210 阅读 · 0 评论 -
记忆-oracle-集合
概要名称 表达式 记录类型 type 名称 is record (名1 类型,名2 类型) 索引表 type 名称 is table of 类型 index by 类型 嵌套表 create type 名称 as table of 类型...原创 2019-12-06 11:18:12 · 186 阅读 · 0 评论 -
记忆-oracle-表、约束创建
记忆关系表1.表创建表操作 表名 字段、约束动作 名称 crete table 表名 alter table 表名 add 列名 类型 table 表名 modify table 表名 drop column table 表名 ...原创 2019-12-11 13:47:58 · 192 阅读 · 0 评论 -
Oracle分析函数简析-over(Partition by...)
1.说明分析函数用于计算基于组的某种聚合值,它和聚合函数的不同之处是 ,对于每个组返回多行,而聚合函数对于每个组只返回一行。2.创建数据结构使用的脚本create table tb1(id int,v1 int,v2 int);insert into tb1(id,v1,v2) values(1,11,21);insert into tb1(id,v1,v2) value...原创 2019-12-04 14:53:53 · 205 阅读 · 0 评论 -
记忆-oracle游标
概要cursor 游标类型表示 %found SQL 语句影响了一行或多行时为 TRUE %notfound SQL 语句没有影响任何行时为TRUE %isopen 游标是否打开 %rowcount SQL 语句影响的行数 open 打开游标 close 关闭游标 fetch 取得游标的一行数据 open 游标...原创 2019-12-31 14:07:10 · 206 阅读 · 1 评论 -
记忆-oracle-pl/sql编程基础
关键字 说明 deaclare begin exectpion end dbms_output.put_line() 输出 := 赋值 || 连接 constant 常量 not null %type 类型 &print 键盘输入 %rowtype ...原创 2019-12-19 15:49:03 · 156 阅读 · 0 评论