Number of Records in Insert Statement (Oracle)

本秂侑毒 提交于 2019-12-07 05:56:52

问题


I'd like to report on the number of records inserted in an Oracle insert statement. I'm inserting from a statement, so I could run my select twice and a count, but I'd rather keep it all in a single statement. Is there a way?


回答1:


Doing an INSERT in PL/SQL SQL%ROWCOUNT gives the number of inserted rows.

Doing an INSERT in C# cmd.ExecuteNonQuery() returns the number of inserted rows.



来源:https://stackoverflow.com/questions/1468396/number-of-records-in-insert-statement-oracle

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!