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

    <tfoot id='mawFk'></tfoot>

        <legend id='mawFk'><style id='mawFk'><dir id='mawFk'><q id='mawFk'></q></dir></style></legend>
      1. <small id='mawFk'></small><noframes id='mawFk'>

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

        批量插入 Oracle 数据库:哪个更好:FOR Cursor 循环还是简单的 Select?

        时间:2023-11-02

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

            <tbody id='O9DhI'></tbody>

                  <bdo id='O9DhI'></bdo><ul id='O9DhI'></ul>
                  <legend id='O9DhI'><style id='O9DhI'><dir id='O9DhI'><q id='O9DhI'></q></dir></style></legend>
                  <tfoot id='O9DhI'></tfoot>
                • <i id='O9DhI'><tr id='O9DhI'><dt id='O9DhI'><q id='O9DhI'><span id='O9DhI'><b id='O9DhI'><form id='O9DhI'><ins id='O9DhI'></ins><ul id='O9DhI'></ul><sub id='O9DhI'></sub></form><legend id='O9DhI'></legend><bdo id='O9DhI'><pre id='O9DhI'><center id='O9DhI'></center></pre></bdo></b><th id='O9DhI'></th></span></q></dt></tr></i><div id='O9DhI'><tfoot id='O9DhI'></tfoot><dl id='O9DhI'><fieldset id='O9DhI'></fieldset></dl></div>
                  本文介绍了批量插入 Oracle 数据库:哪个更好:FOR Cursor 循环还是简单的 Select?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  哪个是批量插入 Oracle 数据库的更好选择?一个 FOR 光标循环,如

                  Which would be a better option for bulk insert into an Oracle database ? A FOR Cursor loop like

                  DECLARE
                     CURSOR C1 IS SELECT * FROM FOO;
                  BEGIN
                     FOR C1_REC IN C1 LOOP
                     INSERT INTO BAR(A,
                                  B,
                                  C)
                            VALUES(C1.A,
                                   C1.B,
                                   C1.C);
                     END LOOP;
                  END
                  

                  或简单的选择,例如:

                  INSERT INTO BAR(A,
                                  B,
                                  C)
                          (SELECT A,
                                  B,
                                  C
                          FROM FOO);
                  

                  有什么具体原因,哪一个会更好?

                  Any specific reason either one would be better ?

                  推荐答案

                  我推荐选择选项,因为光标需要更长的时间.
                  对于必须修改查询的任何人来说,使用 Select 也更容易理解

                  I would recommend the Select option because cursors take longer.
                  Also using the Select is much easier to understand for anyone who has to modify your query

                  这篇关于批量插入 Oracle 数据库:哪个更好:FOR Cursor 循环还是简单的 Select?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:Oracle:如何“分组"超过一个范围? 下一篇:如何执行oracle存储过程?

                  相关文章

                • <tfoot id='jtsAA'></tfoot>
                • <legend id='jtsAA'><style id='jtsAA'><dir id='jtsAA'><q id='jtsAA'></q></dir></style></legend>

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

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

                      <bdo id='jtsAA'></bdo><ul id='jtsAA'></ul>