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

          <bdo id='X6VHS'></bdo><ul id='X6VHS'></ul>
      1. <legend id='X6VHS'><style id='X6VHS'><dir id='X6VHS'><q id='X6VHS'></q></dir></style></legend>
        <tfoot id='X6VHS'></tfoot>

      2. <i id='X6VHS'><tr id='X6VHS'><dt id='X6VHS'><q id='X6VHS'><span id='X6VHS'><b id='X6VHS'><form id='X6VHS'><ins id='X6VHS'></ins><ul id='X6VHS'></ul><sub id='X6VHS'></sub></form><legend id='X6VHS'></legend><bdo id='X6VHS'><pre id='X6VHS'><center id='X6VHS'></center></pre></bdo></b><th id='X6VHS'></th></span></q></dt></tr></i><div id='X6VHS'><tfoot id='X6VHS'></tfoot><dl id='X6VHS'><fieldset id='X6VHS'></fieldset></dl></div>
      3. 获取oracle db中最后插入记录的ID

        Get ID of last inserted record in oracle db(获取oracle db中最后插入记录的ID)
        • <bdo id='wYc5c'></bdo><ul id='wYc5c'></ul>
            <legend id='wYc5c'><style id='wYc5c'><dir id='wYc5c'><q id='wYc5c'></q></dir></style></legend>
                <tbody id='wYc5c'></tbody>
            • <small id='wYc5c'></small><noframes id='wYc5c'>

              <tfoot id='wYc5c'></tfoot>

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

                  本文介绍了获取oracle db中最后插入记录的ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我想用自动递增的 id 列(使用序列和触发器方法)检索新插入记录的 id.执行此操作的标准方法是什么?

                  I want to retrieve the id of a newly inserted record with an auto incrementing id column (using the sequence and trigger method). What is the standard way to do this?

                  推荐答案

                  使用 PL/SQL RETURNING 子句:

                  Use the PL/SQL RETURNING clause:

                  insert into mytable (...) values (...)
                  returning id into v_id;
                  

                  这篇关于获取oracle db中最后插入记录的ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  Oracle PL/SQL - Raise User-Defined Exception With Custom SQLERRM(Oracle PL/SQL - 使用自定义 SQLERRM 引发用户定义的异常)
                  Oracle: is there a tool to trace queries, like Profiler for sql server?(Oracle:是否有跟踪查询的工具,例如用于 sql server 的 Profiler?)
                  SELECT INTO using Oracle(使用 Oracle SELECT INTO)
                  How to handle Day Light Saving in Oracle database(如何在 Oracle 数据库中处理夏令时)
                  PL/SQL - Use quot;Listquot; Variable in Where In Clause(PL/SQL - 使用“列表Where In 子句中的变量)
                  Oracle: Import CSV file(Oracle:导入 CSV 文件)
                  • <i id='dbMK4'><tr id='dbMK4'><dt id='dbMK4'><q id='dbMK4'><span id='dbMK4'><b id='dbMK4'><form id='dbMK4'><ins id='dbMK4'></ins><ul id='dbMK4'></ul><sub id='dbMK4'></sub></form><legend id='dbMK4'></legend><bdo id='dbMK4'><pre id='dbMK4'><center id='dbMK4'></center></pre></bdo></b><th id='dbMK4'></th></span></q></dt></tr></i><div id='dbMK4'><tfoot id='dbMK4'></tfoot><dl id='dbMK4'><fieldset id='dbMK4'></fieldset></dl></div>

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

                            <tbody id='dbMK4'></tbody>

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

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

                            <tfoot id='dbMK4'></tfoot>