数据库事务管理(table join desc)

事务,就是在逻辑上控制顺序来完成的一组工作序列单元。

一个事务可以是一条DML语句。当管理事务的语句组时,事务组中的每条语句必须作为一个整体全部成功执行,要么它们全部都没有成功的执行。

事务的属性描述如下:

1、所有的事务都有一个开始和结束
2、一个事务可以被保存和撤销
3、如果一个事务在执行过程中失败、事务中的任何一部分都不会保存到数据库中。

用于事务控制的命令有3条:
COMMIT
ROLLBACK
SAVEPOINT

注意:事务控制命令仅仅用于DML命令中(INSERT,UPDATE,DELETE).
COMMIT命令是一条事务命令,用于保存数据库中由事务引起的改变。
COMMIT命令保存 ROLLBACK撤销命令

The possible types of qualified join are:

INNER JOIN
For each row R1 of T1, the joined table has a row for each row in T2 that satisfies the join condition with R1.

LEFT OUTER JOIN
First, an inner join is performed. Then, for each row in T1 that does not satisfy the join condition with any row in T2, a joined row is added with null values in columns of T2. Thus, the joined table always has at least one row for each row in T1.

RIGHT OUTER JOIN
First, an inner join is performed. Then, for each row in T2 that does not satisfy the join condition with any row in T1, a joined row is added with null values in columns of T1. This is the converse of a left join: the result table will always have a row for each row in T2.

FULL OUTER JOIN
First, an inner join is performed. Then, for each row in T1 that does not satisfy the join condition with any row in T2, a joined row is added with null values in columns of T2. Also, for each row of T2 that does not satisfy the join condition with any row in T1, a joined row with null values in the columns of T1 is added.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值