当前位置:网站首页>GBase 8s V8. 8 SQL Guide: Tutorial - 6.2.1 (2)
GBase 8s V8. 8 SQL Guide: Tutorial - 6.2.1 (2)
2022-04-22 22:42:00 【Gbase database】
surface 1. Query results

If you want to store the results of the self join in a temporary table , It will be INTO TEMP Clause appended to SELECT language
Sentence , And assign display labels to at least one group of columns , To rename these columns . otherwise , Repeating column names will result in errors , and
And will not create temporary tables .
The following query , It's similar to the picture 1, Mark from orders All columns selected by the table , And place these columns in a place called shipping Of
In the temporary table .
chart : Inquire about
SELECT x.order_num orders1, x.po_num purch1,
x.ship_date ship1, y.order_num orders2,
y.po_num purch2, y.ship_date ship2
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 orders1, orders2
INTO TEMP shipping;
If you from the table shipping Query in SELECT *, You can see the following lines .
chart : Query results
orders1 purch1 ship1 orders2 purch2 ship2
1004 8006 05/30/1998 1011 B77897 07/03/1998
1004 8006 05/30/1998 1020 W2286 07/16/1998
1004 8006 05/30/1998 1022 W9925 07/30/1998
1005 2865 06/09/1998 1011 B77897 07/03/1998
⋮
1019 Z55709 07/16/1998 1020 W2286 07/16/1998
1019 Z55709 07/16/1998 1022 W9925 07/30/1998
1023 KF2961 07/30/1998 1011 B77897 07/03/1998
You can connect a table to itself multiple times . The maximum number of self connections depends on the resources available to you .
版权声明
本文为[Gbase database]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204222204593873.html
边栏推荐
- Overview of working principle and main characteristics of ATOS proportional valve
- MySql内置函数
- Best buy website EDI test process
- js 截取文件后缀名
- IPO of China first science and Technology Shenzhen Stock Exchange: another listed enterprise was born in Hubei with a market value of 8.3 billion
- opcua协议如何在appinventor上使用?
- JS solving power deduction daily question (8) -- 396 Rotation function (2022-4-22)
- Flutter混合开发
- 来个 vue 大佬,看看有没有 iframe 缓存方案?
- Enter a line of characters, separated by a space between words, and count how many words there are
猜你喜欢

Basic practice of C language (001-1)

LLVM 学习(一) -初识LLVM

MySql--表的操作

Metawork: please, this remote pairing programming is cool!

High end beer is losing young people

Transport layer - overview of transport layer (1)

不能再简单的意向锁

一个简单易用的文件上传方案

Why is bi so important to enterprises?

2.58-编写程序is-little-endian,当在小端法机器上编译和运行时返回1,在大端法机器上编译和运行时则返回0。这个程序应该可以运行在任何机器上,无论机器的字长是多少。
随机推荐
Transport layer - connectionless transport: UDP (2)
A simple and easy-to-use file upload scheme
4 / 21 Kunming supplementary questions + mathematics
不能再简单的意向锁
2.57-编写程序show_short, show_long和show_double,它们分别打印类型为short, long和double的C语言对象的字节表示。请试着在几种机器上运行。
知识图谱开篇笔记
Best buy website EDI test process
opcua协议如何在appinventor上使用?
2.58-编写程序is-little-endian,当在小端法机器上编译和运行时返回1,在大端法机器上编译和运行时则返回0。这个程序应该可以运行在任何机器上,无论机器的字长是多少。
repeat_string删除部分字符
Kunlundb's support for MySQL private DML syntax
41.0:GemBox.Spreadsheet|.Document|.Pdf|.Presentation
MySql内置函数
MySql--库的操作
【4.1】flink窗口算子的trigger触发器和Evictor清理器
【微信小程序开发(云壁纸小程序教程)】
O0 O1 O2 O3优化原理
用forEach和ES6实现tab切换
删除 vector 内所有指定的元素
A journey to C by Xiao Sai Mao -- first understanding of C language (3)