当前位置:网站首页>Gbase8s database select has order by Clause 5
Gbase8s database select has order by Clause 5
2022-06-29 12:18:00 【Like to eat radish ice cold】
Use the selection number
In the column name position , You can go to ORDER BY Clause , To quote listed in Projection Clause
The location of the items listed in the selection list of . You can also use the selection number to sort by expression .
The following example uses the selection number in a nested sort to follow the expression paid_date - order_date and customer_num row
order :
SELECT order_num, customer_num, paid_date - order_date
FROM orders
ORDER BY 3, 2;
When passed UNION or UNION ALL Keyword connection SELECT When the sentence is , Or when there are incompatible columns in the same location
With the same name , stay ORDER BY You need to select a number in the clause .
Press Rowid Sort
You can go to ORDER BY Clause ROWID keyword . This specifies rowid Column , In the table divided into slices and with WITH
ROWIDS Clause creates a hidden column in a partitioned table .rowid Columns contain unique internal records associated with rows in the table
Number .( However , It is recommended that you use the primary key as your access method , Instead of using rowid Column .)
If the table you are selecting from is one without rowid A partitioned table of columns , be ORDER BY Clause cannot specify rowid
Column .
When you are in ORDER BY Clause ROWID when , You don't need to be in Projection Clause includes ROWID The key
word .
To get information about rowid Values and how to use them in list expressions rowid Column for further information , see also WITH
ROWIDS Options and Use Rowid.
with DECLARE Of ORDER BY Clause
stay GBase 8s ESQL/C in , You may not use the with FOR UPDATE Clause DECLARE Statement to compare a cursor with no
ORDER BY Clause SELECT Statement .
stay ORDER BY Set index on column
When you are in SELECT The statement includes ORDER BY When clause , You can do this by ORDER BY Clause specifies one or more columns
Create indexes on columns to improve query performance . The database server uses your ORDER BY The index set on the column to be most efficient
To sort the query results . To learn more about how to create and ORDER BY The information of the index corresponding to the column of the clause ,
see also Use ASC and DESC Sort order options .
边栏推荐
- 黑化的蜜雪冰城,凭营销就想抓牢消费者的心?
- Initial use of eolink
- MySQL主从同步之 异步复制 半同步复制 全同步复制
- Imile uses Zadig's multi cloud environment to deploy thousands of times a week to continuously deliver global business across clouds and regions
- 《Go题库·14》WaitGroup的坑
- Jerry's about TWS pairing mode configuration [chapter]
- 普通用户使用vscode登录ssh编辑root文件
- ERP编制物料清单 金蝶
- The blackened honeysnow ice city wants to grasp the hearts of consumers by marketing?
- bison使用error死循环的记录
猜你喜欢

When a technician becomes a CEO, what "bugs" should be modified?

Ttchat x Zadig open source co creates helm access scenarios, and environmental governance can be done!

文件包含之日志中毒(User-Agent)
联想领像 lenovoimage 部分打印机 驱动 PPD 文件

Imile uses Zadig's multi cloud environment to deploy thousands of times a week to continuously deliver global business across clouds and regions

& 3 view request message and response message in browser

Titanium dynamic technology: our Zadig landing Road

Embedded database development programming (IV) -- DDL, DML
![[pbootcms template] composition website / document download website source code](/img/6e/51bbb4ce961defa4abd098ff3af21f.jpg)
[pbootcms template] composition website / document download website source code

Wonderful! Miaoying technology fully implements Zadig to help container construction, and fully embraces kubernetes and Yunyuan
随机推荐
pod安全策略(PSP)
Installation and configuration of MariaDB
嵌入式数据库开发编程(四)——DDL、DML
力扣每日一题-第31天-1779.找到最近的有相同x或y坐标的点
Windwos10安装sshd服务
Jerry's configuration of TWS cross pairing [chapter]
GBase8s数据库与 FOR UPDATE 子句不兼容的语法
Win11 web version
Serving millions of developers, the first techo day Tencent technology open day released 7 "lightweight" products
ERP编制物料清单 基础
&4 express框架
torch.load加载模型报错:Can‘t get attribute ‘vae_vc‘ on <module ‘__main__‘ from ‘xxxx()运行文件路径‘
Students' programming stories
Pytoch - distributed communication primitive (with source code)
Li Kou daily question - day 31 -13 Maximum perimeter of triangle
龙书虎书鲸书啃不动?试试豆瓣评分9.5的猴书
Jerry's about TWS pairing mode configuration [chapter]
杰理之关于 TWS 配对方式配置【篇】
速看|期待已久的2022年广州助理检测工程师真题解析终于出炉
杰理之关于 TWS 配对方式配置【篇】