首页 > 其他 > 详细

information_schema.tables+concat()实现命令拼接:

时间:2021-01-18 20:01:09      阅读:6      评论:0      收藏:0      [点我收藏+]

1concat()的作用:

可以实现拼接命令

mysql> select user,host from mysql.user;
+---------------+---------------+
| user          | host          |
+---------------+---------------+
| root          | %             |
| tyjs09        | %             |
| zhihu         | 10.0.0.%      |
| root          | 106.13.186.56 |
| mysql.session | localhost     |
| mysql.sys     | localhost     |
+---------------+---------------+
6 rows in set (0.01 sec)

mysql> select concat(user,"@",host) from mysql.user;
+-------------------------+
| concat(user,"@",host)   |
+-------------------------+
| [email protected]%                  |
| [email protected]%                |
| [email protected]%          |
| [email protected]      |
| [email protected] |
| [email protected]     |
+-------------------------+
6 rows in set (0.00 sec)

mysql> 

 

information_schema.tables+concat()实现命令拼接:

原文:https://www.cnblogs.com/tyjs09/p/14280397.html

(0)
(0)
   
举报
评论 一句话评论(0
© 2014 bubuko.com 版权所有 鲁ICP备09046678号-4
打开技术之扣,分享程序人生!
             

鲁公网安备 37021202000002号