当前位置:网站首页>Gbase8s database into standard and into raw clauses
Gbase8s database into standard and into raw clauses
2022-06-29 12:19:00 【Like to eat radish ice cold】
You can use it. INTO STANDARD and INTO RAW Clause to create a new storage SELECT Statement's result set .
This syntax provides a single mechanism for specifying queries , To receive qualified records , And insert those query results into permanent database tables .
When using SELECT INTO To create a new permanent table , You can specify its type as STANDARD or RAW. default
The type is STANDARD. You can optionally specify the storage location of the new table 、extent Size and lock mode options .
The column name of the new persistent table is in Projection The names specified in the selection list of the clause . If the asterisk (
*) As
Projection A selection list of clauses appears , Then the asterisk extends to SELECT Of the statement FROM The corresponding table or view in the clause
All column names of . No shadow column is extended by the asterisk specification .
The following example creates a new named ptabl Of raw Table to store the results of the join query :
SELECT t1col1, t1col2, t2col1
FROM tab1, tab2
WHERE t1col1 < 100 and t2col1 > 5
INTO RAW ptab1;
In the example above , new ptabl Tables may contain columns t1col1、t1col2 and t2col1.
All expressions except simple list expressions must have a definition in Projection Display label in clause . This display
The label is used as the name of the column in the new table . If it's simple ( Or ordinary ) The list expression does not display a label , Then the table uses column names
call . If there are duplicate display labels or column names in the selection list , Returns an error .
The next example fails with an error -249, Because it is not for col1+5 Expression declaration display label :
SELECT col1+5, col2
FROM tab1
INTO ptab1;
The following revised query avoids the -249 error :
SELECT col1+5 pcol1, col2
FROM tab1
INTO ptab1;
The example of the above modification creates the standard ptabl The table comes in its columns pcol1 and col2 Store query results in .
Limitations on the result table
With the most DDL The sentence is the same , An attempt to create a new result table in another database with a fully qualified table name failed
And return the syntax error .
To create a result table with the same name as an existing table in the same database , Similar errors will occur .
SELECT INTO . . . TABLE Statement cannot be used as part of a subquery .
However , You can use not SELECT Clause projection Columns that are part of the list are treated as ORDER BY Row in clause
Ordinal key .
To get a query result table that can be similarly created and populated by inserting qualified rows CREATE TABLE language
A description of sentence grammar , see also AS SELECT Clause .
边栏推荐
- GBase8s数据库对 STANDARD 或 RAW 结果表排序
- & 3 view request message and response message in browser
- ShanDong Multi-University Training #3
- GBase8s数据库select有ORDER BY 子句2
- 恒泰证券开户安全吗 证券排名
- ERP Kingdee for preparing BOM
- Embedded database development programming (IV) -- DDL, DML
- 东方财富证券开户安全吗 证券开户办理
- Jerry's configuration of TWS cross pairing [chapter]
- Gbase8s database select has order by Clause 2
猜你喜欢
![[pbootcms模板]作文网站/文档下载网站源码](/img/6e/51bbb4ce961defa4abd098ff3af21f.jpg)
[pbootcms模板]作文网站/文档下载网站源码

bison使用error死循环的记录
![Jerry's initiation of ear pairing, reconnection, and opening of discoverable and connectable cycle functions [chapter]](/img/d7/f73e748ada302440326a8b1a46f916.png)
Jerry's initiation of ear pairing, reconnection, and opening of discoverable and connectable cycle functions [chapter]

龙书虎书鲸书啃不动?试试豆瓣评分9.5的猴书

大家有没有觉得学机械的人很可怕?

智能垃圾桶(四)——树莓派pico实现超声波测距(HC-SR04)

钛动科技:我们的 Zadig 落地之路

SOFARegistry 源码|数据同步模块解析

MySQL 主从复制原理以及流程

&3 在浏览器中查看请求报文和响应报文
随机推荐
MySQL 主从复制原理以及流程
年轻就要醒着拼,年轻就要勇于尝试
Intelligent trash can (IV) -- raspberry pie Pico realizes ultrasonic ranging (hc-sr04)
GBase8s数据库INTO STANDARD 和 INTO RAW 子句
在校生的编程故事
MariaDB的安装与配置
How to view saved passwords of websites
MATLAB Gui 实现点击按钮,打开文件对话框,导入图片功能
《Go题库·14》WaitGroup的坑
ERP编制物料清单 基础
如何查看网站已经保存的密码
Gbase8s database select has order by Clause 3
An interpretable geometric depth learning model for structure based protein binding site prediction
AutoCAD - text display mode and how CAD can directly open Tianzheng drawings
求大数的阶乘 ← C语言
Titanium dynamic technology: our Zadig landing Road
联想领像 lenovoimage 部分打印机 驱动 PPD 文件
一种可解释的几何深度学习模型,用于基于结构的蛋白质结合位点预测
GBase8s数据库select有ORDER BY 子句6
助力极致体验,火山引擎边缘计算最佳实践