当前位置:网站首页>GBase 8s V8. 8 SQL Guide: Tutorial - 6.2.1 (1)
GBase 8s V8. 8 SQL Guide: Tutorial - 6.2.1 (1)
2022-04-22 22:42:00 【Gbase database】
6.2.1 Self join
The join does not always involve two different tables , You can connect a table to itself , Create self connection . When you want to put in a column
When the value of is compared with other values in the same column , It's useful to connect a table to itself .
To create a self connection , stay FROM The table is listed twice in the clause , And give it a different alias each time . Use the alias
stay Projection and WHERE Reference table in clause . It's like two separate tables .(SELECT In the sentence
Alias in alias and GBase 8s SQL guide : Discussion in grammar .)
The same as the connection between tables , You can use arithmetic expressions in a self join , You can test null values . have access to ORDER
BY Clause to sort the values in the specified column in ascending or descending order .
The following query ship_weight Five times or more and ship_date Orders that are not empty . next , Search by
mirror ship_date Sort the data .
chart : Inquire about
SELECT x.order_num, x.ship_weight, x.ship_date,
y.order_num, y.ship_weight, y.ship_date
FROM orders x, orders y
WHERE x.ship_weight >= 5 * y.ship_weight
AND x.ship_date IS NOT NULL
AND y.ship_date IS NOT NULL
ORDER BY x.ship_date;
版权声明
本文为[Gbase database]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204222204593914.html
边栏推荐
- 2021下半年软件设计师上午真题及答案解析
- Which is the most suitable educational financial product?
- 2.60-假设我们将一个w位的字中的字节从0(最低位)到w/8- 1(最高位)编号。写出下面C函数的代码,它会返回一个无符号值,其中参数x的字节i被替换成字节b。
- 东吴证券X袋鼠云:数据轻松可取、毫秒级反应能力,东吴证券做对了什么?
- [wechat applet development (cloud wallpaper applet tutorial)]
- jsp的form表单提交给servlet但js失效问题
- 100 billion level im independent development guide! Global instant messaging full set of codes 4 hours quick (II)
- [Istio是什么?] 还不知道你就out了,一文40分钟快速理解
- 【零散知识点总结5】
- Why is bi so important to enterprises?
猜你喜欢

GORM 预加载和自引用

Reinforcement learning (practice): dqn, double dqn, dueling dqn

How should enterprises make disaster recovery plans for Cloud Computing?

深开鸿新闻直播间首次开播 共同见证时代成长全历程

2.59-编写一个C表达式,它生成一个字,由x的最低有效字节和y中剩下的字节组成。对于运算数x =0x89ABCDEF和y=0x76543210,就得到0x765432EF.

TOOLS. INI‘does not contain a valid tool path

2.56-试着用不同的示例值来运行show_bytes的代码。

2.57-编写程序show_short, show_long和show_double,它们分别打印类型为short, long和double的C语言对象的字节表示。请试着在几种机器上运行。

2.55-在你能够访问的不同机器上,使用show_bytes(文件show_bytes.c)编译并运行示例代码。确定这些机器使用的字节顺序。

【洛谷】P1162 填涂颜色(bfs)
随机推荐
Best buy website EDI test process
GBase 8s V8.8 SQL 指南:教程-6.2.1(3)
略谈企业信息化的规律
These two kinds of people can't do well in we media and can't make a lot of money all their life
赛微微电上市首日破发:市值蒸发超15亿元,经营规模略输一筹
MySql--- 数据类型
未来可期,PlatoFarm的生态通证登录Bitmart等全球四大平台
Which is the most suitable educational financial product?
高端啤酒正在失去年轻人
No more simple intention lock
快速计算约数的个数——从基础到高级
二分法应用:875. 爱吃香蕉的珂珂
Text processing mode out of bootrap box
js 截取文件后缀名
Preprocessing is the process of a program
appinventor拓展开发
Lily medical IPO was terminated: Huang Weiguo, the father of Huang Kai, the actual controller, was once the vice mayor of Foshan
[Istio是什么?] 还不知道你就out了,一文40分钟快速理解
一个简单易用的文件上传方案
处理用逗号分隔的字符串 并按字典升序排序输出