我意外地写了一个类似的查询select from my_table;,令人惊讶的是它是有效的声明.对我来说更有趣的是,即使SELECT;是PostgreSQL中的有效查询.您可以尝试使用以下方法编写很多有趣的查询:
select union all select;
with t as (select) select;
select from (select) a, (select) b;
select where exists (select);
create table a (b int); with t as (select) insert into a (select from t);
Run Code Online (Sandbox Code Playgroud)
这是一些定义SQL标准的结果,还是有一些用例,或者只是有趣的行为,没有人关心以编程方式限制?
| 归档时间: |
|
| 查看次数: |
447 次 |
| 最近记录: |