本文最后更新于 2025-06-11T22:11:45+08:00
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
查询一致

table
支持order by
、limit
、offset
等限制条件

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

table
支持union
联合查询
1
| table num1 union table num2;
|

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