<i id='aBDPt'><tr id='aBDPt'><dt id='aBDPt'><q id='aBDPt'><span id='aBDPt'><b id='aBDPt'><form id='aBDPt'><ins id='aBDPt'></ins><ul id='aBDPt'></ul><sub id='aBDPt'></sub></form><legend id='aBDPt'></legend><bdo id='aBDPt'><pre id='aBDPt'><center id='aBDPt'></center></pre></bdo></b><th id='aBDPt'></th></span></q></dt></tr></i><div id='aBDPt'><tfoot id='aBDPt'></tfoot><dl id='aBDPt'><fieldset id='aBDPt'></fieldset></dl></div>
    • <bdo id='aBDPt'></bdo><ul id='aBDPt'></ul>

    <small id='aBDPt'></small><noframes id='aBDPt'>

    <legend id='aBDPt'><style id='aBDPt'><dir id='aBDPt'><q id='aBDPt'></q></dir></style></legend>

    <tfoot id='aBDPt'></tfoot>

        Oracle 是否有等效于 SQL Server 的表变量?

        Does Oracle have an equivalent of SQL Server#39;s table variables?(Oracle 是否有等效于 SQL Server 的表变量?)
        • <small id='hWiAO'></small><noframes id='hWiAO'>

            <tbody id='hWiAO'></tbody>
            <bdo id='hWiAO'></bdo><ul id='hWiAO'></ul>

                  <i id='hWiAO'><tr id='hWiAO'><dt id='hWiAO'><q id='hWiAO'><span id='hWiAO'><b id='hWiAO'><form id='hWiAO'><ins id='hWiAO'></ins><ul id='hWiAO'></ul><sub id='hWiAO'></sub></form><legend id='hWiAO'></legend><bdo id='hWiAO'><pre id='hWiAO'><center id='hWiAO'></center></pre></bdo></b><th id='hWiAO'></th></span></q></dt></tr></i><div id='hWiAO'><tfoot id='hWiAO'></tfoot><dl id='hWiAO'><fieldset id='hWiAO'></fieldset></dl></div>
                  <legend id='hWiAO'><style id='hWiAO'><dir id='hWiAO'><q id='hWiAO'></q></dir></style></legend>
                  <tfoot id='hWiAO'></tfoot>
                1. 本文介绍了Oracle 是否有等效于 SQL Server 的表变量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  在 SQL Server 中,您可以声明一个表变量(DECLARE @table TABLE),该变量在脚本运行时生成,然后从内存中删除.

                  In SQL Server, you can declare a table variable (DECLARE @table TABLE), which is produced while the script is run and then removed from memory.

                  oracle 有没有类似的功能?还是我坚持使用对我的硬盘进行分段的 CREATE/DROP 语句?

                  Does Oracle have a similar function? Or am I stuck with CREATE/DROP statements that segment my hard drive?

                  推荐答案

                  是.

                  在 a 中声明 TABLE TYPE 变量PL/SQL 声明块.表变量也称为按表索引或大批.表变量包含一个列必须是标量或记录数据类型加上主键输入 BINARY_INTEGER.语法:

                  Declare TABLE TYPE variables in a PL/SQL declare block. Table variables are also known as index-by table or array. The table variable contains one column which must be a scalar or record datatype plus a primary key of type BINARY_INTEGER. Syntax:

                  声明类型 type_name 是表(列类型 |变量%TYPE |表.列%TYPE[非空]按二进制整数索引;

                  DECLARE TYPE type_name IS TABLE OF (column_type | variable%TYPE | table.column%TYPE [NOT NULL] INDEX BY BINARY INTEGER;

                  -- 然后声明一个这种类型的 TABLE 变量:variable_name type_name;

                  -- Then to declare a TABLE variable of this type: variable_name type_name;

                  -- 为 TABLE 变量赋值:变量名(n).field_name :='一些文字';-- 其中 'n' 是指标值

                  -- Assigning values to a TABLE variable: variable_name(n).field_name := 'some text'; -- Where 'n' is the index value

                  参考:http://www.iselfschooling.com/syntax/OraclePLSQLSyntax.htm

                  您可能还想看看全局临时表

                  这篇关于Oracle 是否有等效于 SQL Server 的表变量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  What does SQL clause quot;GROUP BY 1quot; mean?(SQL 子句“GROUP BY 1是什么意思?意思是?)
                  Why Mysql#39;s Group By and Oracle#39;s Group by behaviours are different(为什么 Mysql 的 Group By 和 Oracle 的 Group by 行为不同)
                  How to select the first row for each group in MySQL?(如何在MySQL中为每个组选择第一行?)
                  MySQL - Fetching lowest value(MySQL - 获取最低值)
                  Add and link mysql libraries in a cmakelist.txt(在 cmakelist.txt 中添加和链接 mysql 库)
                  What is a good database design (schema) for a attendance database?(考勤数据库的良好数据库设计(架构)是什么?)
                  <i id='tIakk'><tr id='tIakk'><dt id='tIakk'><q id='tIakk'><span id='tIakk'><b id='tIakk'><form id='tIakk'><ins id='tIakk'></ins><ul id='tIakk'></ul><sub id='tIakk'></sub></form><legend id='tIakk'></legend><bdo id='tIakk'><pre id='tIakk'><center id='tIakk'></center></pre></bdo></b><th id='tIakk'></th></span></q></dt></tr></i><div id='tIakk'><tfoot id='tIakk'></tfoot><dl id='tIakk'><fieldset id='tIakk'></fieldset></dl></div>
                    <bdo id='tIakk'></bdo><ul id='tIakk'></ul>

                        <tfoot id='tIakk'></tfoot>
                          <tbody id='tIakk'></tbody>

                            <legend id='tIakk'><style id='tIakk'><dir id='tIakk'><q id='tIakk'></q></dir></style></legend>

                            <small id='tIakk'></small><noframes id='tIakk'>