摘要: 条件语句if条件判断语法结构 if search_condition then statement_list [elseif search_condition then statement_list] ... [else statement_list] end if; case结构 语法结构 : 方 阅读全文
posted @ 2021-01-14 22:36 一叶扁舟,乘风破浪 阅读(317) 评论(0) 推荐(0) 编辑
摘要: 触发器: 是数据库的一个程序,他是用来监听着数据表的某个行为,一旦数据表的这个行为发生了,马上执行相应的sql语句 。 无法在业务层面上保证数据准确的时候,用触发器来保证数据的准确性,会有性能损耗。 CREATE TRIGGER trigger_name trigger_time trigger_e 阅读全文
posted @ 2021-01-14 22:26 一叶扁舟,乘风破浪 阅读(80) 评论(0) 推荐(0) 编辑
摘要: 一、手写SQL顺序 select <select_list> from <table_name> <join_type> join <join_table> on <join_condition> where <where_condition> group by <group_by_list> ha 阅读全文
posted @ 2021-01-14 22:22 一叶扁舟,乘风破浪 阅读(2560) 评论(0) 推荐(1) 编辑
摘要: -- 查看 哪张表被锁 show OPEN TABLES where In_use > 0 show open tables from wdgjyun_daerwei; -- 查询所有进行的线程,包括线程的状态,是否锁表等。 show full processlist select * from i 阅读全文
posted @ 2021-01-14 22:21 一叶扁舟,乘风破浪 阅读(146) 评论(0) 推荐(0) 编辑