MySQL8-特性注入-TABLE

MySQL8 环境搭建:https://www.cnblogs.com/2020javamianshibaodian/p/12906655.html

table

官方文档:https://dev.mysql.com/doc/refman/8.0/en/table.html

table函数是MySQL8版本新增的函数,作用和select函数类似,作用是列出表中的全部信息,但是前提是要知道表名

规范语法

1
TABLE table_name [ORDER BY column_name] [LIMIT number [OFFSET number]] 

使用table函数查询users表中的内容,结果和常规的使用select查询一致

1
table users;
1
select * from users;

image-20250611212135187

table支持order bylimitoffset等限制条件

1
table num order by b;
1
table num limit 3;

image-20250611213923292

1
table num order by b limit 3;
1
table num order by b limit 3 offset 2;

image-20250611214201800

table支持union联合查询

1
table num1 union table num2;

image-20250611214914075

不可以使用where限定查询某一行

image-20250611215902088


MySQL8-特性注入-TABLE
https://yschen20.github.io/2025/06/11/MySQL8-特性注入-TABLE/
作者
Suzen
发布于
2025年6月11日
更新于
2025年6月11日
许可协议