开发者

INSERT inside plsql procedure does not tell how many rows were inserted

i am trying to insert some rows 开发者_如何学编程and update some rows inside a pl/sql loop.

however all i get to see is the pl/sql procedure is successfully completed.

i do get to see dbmbs_ouput statements but not the output status of insert and/or update queries.

the serveroutput is set to on.

how do i get to see the status of insert and update rows(namely how many rows were inserted and updated)


In Oracle, the rowcount is not output automatically like it is in SQL Server.

You should do it explicitly:

BEGIN
        INSERT
        INTO    mytable
        SELECT  …
        FROM    other_table;
        DBMS_OUTPUT.put_line(SQL%ROWCOUNT);
END;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜