SAVEPOINT 在循环中的独立性
2019年11月24日
没有评论
官方对SAVEPOINT的说明:
Use the SAVEPOINT statement to identify a point in a transaction to which you can later roll back.
简单的理解就是可以部分提交事务
官网的一个例子:
UPDATE employees
SET salary = 7000
WHERE last_name = 'Banda';
SAVEPOINT banda_sal;
UPDATE employees
SET salary = 12000
WHERE last_name = 'Gre[......]
Oracle 分析函数
2019年1月6日
没有评论
1. 分析函数前传之聚合函数
1.1 聚合函数定义
Aggregate functions return a single result row based on groups of rows
Aggregate functions return a single result row based on groups of rows, rather than on single rows. Aggregate functions can appear in select lists and in ORDER BY and HAVING clauses. They are commo[......]
Oracle SQL 基础培训
2019年1月1日
没有评论
1.SQL基础
1.1 基础语法
- create table
- 普通表
create table ANGU_TEST1
(
id NUMBER
)
tablespace USERS
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 64K
next 1M
minextents 1
maxextents unlimited
);
- 临时表
--基于回话
create global temporary table ANGU_TEMP
(
id NUMBE[......]
利用Oracle UnPivot 实现自定义的行转列
2018年12月24日
没有评论
以下是测试数据
create table Fruit
(id int,name varchar(20),
Q1 int, Q2 int,
Q3 int, Q4 int);
insert into Fruit values(1,'苹果',1000,2000,3300,5000);
insert into Fruit values(2,'橘子',3000,3000,3200,1500);
insert into Fruit values(3,'香蕉',2500,3500,2200,2500);
insert into Fruit values(4,'葡萄',1500,2500,1200,350[......]