当前位置:网站首页>Gbase8s database sorts standard or raw result tables
Gbase8s database sorts standard or raw result tables
2022-06-29 12:18:00 【Like to eat radish ice cold】
When SELECT INTO Table Clause defines a persistent table to store the results of a query , Any nontrivial list in that clause
The expression must also declare an alias for the corresponding column in the newly created result table . Which column should be specified as the sort key of the result table ,ORDER
BY Clause must also refer to the same alias , Instead of specifying nontrivial tabular expressions .
for example , In the following nested queries ,tab56 Is the identifier of the result table , And tab56_col0 Yes subquery in Projection Clause
An alias for a nontrivial list expression defined in .ORDER BY Clause specifies the same subquery as the sort key , Not through
Its alias refers to that nontrivial column :
SELECT ( SELECT tab54.tab54_col7 tab56_col0
FROM tab54
WHERE (tab54.tab54_col7 = -1423023 )
) tab56_col0,
“” tab56_col1
FROM tab57
WHERE tab57.tab57_col1 == -6296233
ORDER BY (
SELECT tab54.tab54_col7 tab56_col0
FROM tab54
WHERE (tab54.tab54_col7 = -1423023 )
) NULLS FIRST,2 NULLS FIRST
INTO tab56;
In the normal SELECT In the sentence , stay ORDER BY It is acceptable to specify nontrivial list expressions in the , But on one
from SELECT INTO Table Clause creates a result table for sorting ORDER BY Clause is not acceptable . On top
In the example , The database server returns SQL error -19828.
To avoid this error , The above example must be modified , Transform the nontrivial tabular expression from ORDER BY Clause remove , Take its alias
Replace that expression :
SELECT ( SELECT tab54.tab54_col7 tab56_col0
FROM tab54
WHERE (tab54.tab54_col7 = -1423023 )
) tab56_col0,
“” tab56_col1
FROM tab57
WHERE tab57.tab57_col1 == -6296233
ORDER BY
tab56_col0 – Substituted alias for column expression in result table)
NULLS FIRST,2 NULLS FIRST
INTO tab56;
边栏推荐
猜你喜欢

黑化的蜜雪冰城,凭营销就想抓牢消费者的心?

地球观测卫星数据

Jericho's position on initiating the connection back to the opposite ear: 【 chapter 】

杰理之关于 TWS 配对方式配置【篇】

& 4 express framework
![Jerry's about TWS pairing mode configuration [chapter]](/img/c8/d78e817295169753244299545d9aba.png)
Jerry's about TWS pairing mode configuration [chapter]

杰理之发起对耳配对、回连、开启可发现、可连接的轮循函数【篇】

ONES 创始人王颖奇对话《财富》(中文版):中国有没有优秀的软件?

How to view saved passwords of websites

An interpretable geometric depth learning model for structure based protein binding site prediction
随机推荐
牛顿不等式
普通用户使用vscode登录ssh编辑root文件
GBase8s数据库select有ORDER BY 子句6
Jerry's about TWS channel configuration [chapter]
Engineering practice behind dall-e 2: ensure that the output of the model complies with the content policy
当技术人成长为 CEO,应该修改哪些“Bug”?
Take another picture of cloud redis' improvement path
爱可可AI前沿推介(6.29)
Pro test! Centos7 deploy PHP + spool
MySQL 主从复制原理以及流程
Unified exception reporting practice based on bytecode
ShanDong Multi-University Training #3
Sofaregistry source code | data synchronization module analysis
Is it safe for Orient Fortune Securities to open an account? Handling of securities account opening
论文复现——AC-FPN:Attention-guided Context Feature Pyramid Network for Object Detection.
SOFARegistry 源码|数据同步模块解析
RSLO:自监督激光雷达里程计(实时+高精度,ICRA2022)
钛动科技:我们的 Zadig 落地之路
torch. Load load model error: can't get attribute 'VAE_ vc‘ on <module ‘__ main__‘ From 'xxxx() run file path‘
在校生的编程故事