当前位置:网站首页>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;
边栏推荐
- 面试突击61:说一下MySQL事务隔离级别?
- 如何查看网站已经保存的密码
- Windwos10安装sshd服务
- Installation and configuration of MariaDB
- 模糊图片变清晰,一键双色图片,快速整理本地图片...这8个在线图片工具申请加入你的收藏夹!
- Matlab GUI realizes the function of clicking the button, opening the file dialog box and importing pictures
- Unified exception reporting practice based on bytecode
- When a technician becomes a CEO, what "bugs" should be modified?
- Jerry's manual pairing method [chapter]
- iMile 利用 Zadig 多云环境周部署千次,跨云跨地域持续交付全球业务
猜你喜欢

&4 express框架

&3 在浏览器中查看请求报文和响应报文

每周推荐短视频:爱因斯坦是怎样思考问题的?
![[pbootcms模板]作文网站/文档下载网站源码](/img/6e/51bbb4ce961defa4abd098ff3af21f.jpg)
[pbootcms模板]作文网站/文档下载网站源码

An interpretable geometric depth learning model for structure based protein binding site prediction

Wonderful! Miaoying technology fully implements Zadig to help container construction, and fully embraces kubernetes and Yunyuan

MATLAB Gui 实现点击按钮,打开文件对话框,导入图片功能

ERP编制物料清单 华夏

什么是外链和内链?

Unified exception reporting practice based on bytecode
随机推荐
RepOptimizer: 其实是RepVGG2
2022 construction worker civil engineering direction general foundation (construction worker) theoretical question bank simulation test platform operation
牛顿不等式
Jerry's about TWS pairing mode configuration [chapter]
& 3 view request message and response message in browser
Helping the ultimate experience, best practice of volcano engine edge computing
【JUC系列】同步工具类之ThreadLocal
Do you think people who learn machinery are terrible?
初次使用 eolink 感受
Li Kou daily question - day 31 -1779 Find the nearest point with the same X or Y coordinate
Pro test! Centos7 deploy PHP + spool
How to obtain method parameter values through WinDbg
GBase8s数据库select有ORDER BY 子句5
《Go题库·14》WaitGroup的坑
Serving millions of developers, the first techo day Tencent technology open day released 7 "lightweight" products
Win11 web version
谷粒商城项目
GBase8s数据库INTO table 子句
GBase8s数据库select有ORDER BY 子句
&4 express框架