• <small id='Hulg8'></small><noframes id='Hulg8'>

        <bdo id='Hulg8'></bdo><ul id='Hulg8'></ul>
      <legend id='Hulg8'><style id='Hulg8'><dir id='Hulg8'><q id='Hulg8'></q></dir></style></legend>

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

        使用 Oracle SELECT INTO

        SELECT INTO using Oracle(使用 Oracle SELECT INTO)
        • <bdo id='V5V7t'></bdo><ul id='V5V7t'></ul>
            <tfoot id='V5V7t'></tfoot>

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

                <legend id='V5V7t'><style id='V5V7t'><dir id='V5V7t'><q id='V5V7t'></q></dir></style></legend>
                  <tbody id='V5V7t'></tbody>

                • <i id='V5V7t'><tr id='V5V7t'><dt id='V5V7t'><q id='V5V7t'><span id='V5V7t'><b id='V5V7t'><form id='V5V7t'><ins id='V5V7t'></ins><ul id='V5V7t'></ul><sub id='V5V7t'></sub></form><legend id='V5V7t'></legend><bdo id='V5V7t'><pre id='V5V7t'><center id='V5V7t'></center></pre></bdo></b><th id='V5V7t'></th></span></q></dt></tr></i><div id='V5V7t'><tfoot id='V5V7t'></tfoot><dl id='V5V7t'><fieldset id='V5V7t'></fieldset></dl></div>
                • 本文介绍了使用 Oracle SELECT INTO的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在尝试使用 Oracle 执行 SELECT INTO.我的查询是:

                  I'm trying to do a SELECT INTO using Oracle. My query is:

                  SELECT * INTO new_table FROM old_table;
                  

                  但我收到以下错误:

                  SQL Error: ORA-00905: missing keyword
                  00905. 00000 -  "missing keyword"
                  

                  知道有什么问题吗?

                  上面的标准行为应该是我原先认为的:然而,Oracle 用他们自己的 SQL 方言完全不同地实现了它插入 Oracle 文档...选择

                  The Standard behavior of the above should be as I originally thought: However Oracle implemented it totally differently in their own dialect of SQL Oracle Docs on Insert ... Select

                  推荐答案

                  如果 NEW_TABLE 已经存在,则 ...

                  If NEW_TABLE already exists then ...

                  insert into new_table 
                  select * from old_table
                  /
                  

                  如果你想根据 OLD_TABLE 中的记录创建 NEW_TABLE ...

                  If you want to create NEW_TABLE based on the records in OLD_TABLE ...

                  create table new_table as 
                  select * from old_table
                  /
                  

                  如果目的是创建一个新的但为空的表,则使用 WHERE 子句,其条件永远不会为真:

                  If the purpose is to create a new but empty table then use a WHERE clause with a condition which can never be true:

                  create table new_table as 
                  select * from old_table
                  where 1 = 2
                  /
                  

                  请记住,CREATE TABLE ... AS SELECT 仅创建一个与源表具有相同投影的表.新表没有原始表可能具有的任何约束、触发器或索引.那些仍然必须手动添加(如果需要).

                  Remember that CREATE TABLE ... AS SELECT creates only a table with the same projection as the source table. The new table does not have any constraints, triggers or indexes which the original table might have. Those still have to be added manually (if they are required).

                  这篇关于使用 Oracle SELECT INTO的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  ibtmp1是非压缩的innodb临时表的独立表空间,通过innodb_temp_data_file_path参数指定文件的路径,文件名和大小,默认配置为ibtmp1:12M:autoextend,也就是说在文件系统磁盘足够的情况下,这个文件大小是可以无限增长的。 为了避免ibtmp1文件无止境的暴涨导致
                  SQL query to group by day(按天分组的 SQL 查询)
                  What does SQL clause quot;GROUP BY 1quot; mean?(SQL 子句“GROUP BY 1是什么意思?意思是?)
                  MySQL groupwise MAX() returns unexpected results(MySQL groupwise MAX() 返回意外结果)
                  MySQL SELECT most frequent by group(MySQL SELECT 按组最频繁)
                  Include missing months in Group By query(在 Group By 查询中包含缺失的月份)

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

                  • <bdo id='xJaNM'></bdo><ul id='xJaNM'></ul>

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