<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                開發咨詢,想在function返回之前insert或者update的值,postgresql有個returning的特性,可以返回之前各種DML(insert,delete,update)掉的值,比mysql的返回last_insert_id更豐富一點。? 環境:? PostgreSQL 9.3.2? CentOS 6.3? 類似的Function如下: ~~~ CREATE OR REPLACE FUNCTION fun_test(v_id int, v_remark text) RETURNS integer AS $BODY$ declare o_id int; begin perform 1 from foo where id=v_id and remark = v_remark ; if not found then insert into foo(remark) values (v_remark) returning id into o_id; return o_id; else update foo set id=v_id, remark=v_remark where id=v_id and remark = v_remark returning id into o_id; return o_id ; end if; exception when others then raise exception 'exec fun fun_test error,PLZ contact DBA!'; return 999; end; $BODY$ LANGUAGE plpgsql VOLATILE COST 100; ALTER FUNCTION fun_test(int, text) OWNER TO postgres; ~~~ 參考:? http://my.oschina.net/Kenyon/blog/54376? http://my.oschina.net/Kenyon/blog/108303
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看