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