select table_name from information_schema.tables where substr(information_schema.tables.table_schema,1,1)='p';
我想问下这句 mysql语句的意思,如果将p 改为 i 显示的结果会有不同 数据库 pikachu(渗透pikachu的环境)
关于substr在mysql中的用法
- 写回答
- 好问题 0 提建议
- 关注问题
- 邀请回答
-
2条回答 默认 最新
- CSDN专家-sinJack 2022-01-10 22:23关注
select table_name from information_schema.tables where substr(information_schema.tables.table_schema,1,1)='p';substr(str,1,1)表示待截取字符串str,第二个参数表示截取的索引位置,从0开始,1就表示第二个字符开始,第三个参数表示要截取的长度。
查询表名第二个字符为p的表名。
如果换成i就是查询第二个字符为i的表名了。本回答被题主选为最佳回答 , 对您是否有帮助呢?评论 打赏 举报 编辑记录解决 1无用