本文主要是介绍数据库事务管理(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.
这篇关于数据库事务管理(table join desc)的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!