Number of Records in Insert Statement (Oracle)
Question
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?
Solution
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.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow