摘要:
[begin_label:] BEGIN [statement_list] END [end_label] [begin_label:] LOOP statement_list END LOOP [end_label] [begin_label:] REPEAT statement_list UNT 阅读全文
摘要:
[begin_label:] BEGIN [statement_list] END [end_label] BEGIN ... END 语法用于编写复合语句,复合语句可以出现在存储程序(存储过程和函数,触发器和事件)中。复合语句可以包含多个语句,并用BEGIN和 END关键字括起来。 stateme 阅读全文
摘要:
https://dev.mysql.com/doc/refman/5.7/en/sql-prepared-statements.html 阅读全文
摘要:
SET [GLOBAL | SESSION] TRANSACTION transaction_characteristic [, transaction_characteristic] ... transaction_characteristic: { ISOLATION LEVEL level | 阅读全文
摘要:
LOCK TABLES tbl_name [[AS] alias] lock_type [, tbl_name [[AS] alias] lock_type] ... lock_type: { READ [LOCAL] | [LOW_PRIORITY] WRITE } UNLOCK TABLES M 阅读全文
摘要:
SAVEPOINT identifier ROLLBACK [WORK] TO [SAVEPOINT] identifier RELEASE SAVEPOINT identifier InnoDB supports the SQL statements SAVEPOINT, ROLLBACK TO 阅读全文
摘要:
事务控制语句和锁语句也有例外:如果一个隐式提交发生在执行之前,那么其他的在之后也不会发生。 Data definition language (DDL) statements that define or modify database objects. ALTER DATABASE ... UPG 阅读全文
摘要:
https://dev.mysql.com/doc/refman/5.7/en/commit.html START TRANSACTION [transaction_characteristic [, transaction_characteristic] ...] transaction_char 阅读全文
摘要:
UPDATE is a DML statement that modifies rows in a table. Single-table syntax: UPDATE [LOW_PRIORITY] [IGNORE] table_reference SET assignment_list [WHER 阅读全文
摘要:
不建议使用子查询,能用链接的用链接,子查询影响服务器性能。 SELECT * FROM t1 WHERE column1 = (SELECT column1 FROM t2); DELETE FROM t1 WHERE s11 > ANY (SELECT COUNT(*) /* no hint */ 阅读全文