摘要:
查看执行时间 1 show profiles; 2 show variables like "%pro%";查看profiling 是否是on状态; 3 如果是off,则 set profiling = 1; 4 执行自己的sql语句; 5 show profiles;就可以查到sql语句的执行时间 阅读全文
posted @ 2019-11-08 16:53
声声慢43
阅读(1078)
评论(0)
推荐(0)
摘要:
原想法:delete from devices where id in (select max(id) from devices); 报错:ERROR 1093 (HY000): You can't specify target table 'devices' for update in FROM 阅读全文
posted @ 2019-11-08 16:51
声声慢43
阅读(586)
评论(0)
推荐(0)
摘要:
0.准备数据 1.内连接:INNER JOIN 2.左连接:LEFT JOIN 3.右连接:RIGHT JOIN 4.USING子句 扩展知识点: 0.表别名的使用: 1.group by的用法 2.子查询 1)不相关子查询 2)相关子查询 JOIN的含义就如英文单词“join”一样,连接两张表,语 阅读全文
posted @ 2019-11-08 16:41
声声慢43
阅读(6608)
评论(0)
推荐(1)
摘要:
参考:https://blog.51cto.com/13689359/2163402 一、概念: 索引(index) 是用来快速地寻找那些具有特定值的记录,主要是为了检索的方便,加快查询速度。没有索引,MySQL不得不首先以第一条记录开始并然后读完整个表直到它找出相关的行。表越大,花费时间越多。如果 阅读全文
posted @ 2019-11-08 16:29
声声慢43
阅读(309)
评论(0)
推荐(0)
摘要:
1.concat()函数 2.concat_ws()函数 3.group_concat()函数 操作的table select * from test_concat order by id limit 5; 1.concat()函数 功能:将多个字符串连接成一个字符串。 语法:concat(str1 阅读全文
posted @ 2019-11-08 16:22
声声慢43
阅读(28293)
评论(0)
推荐(1)

浙公网安备 33010602011771号