Do I need to issue commit command after running the stored function with select query?
3 Answers
Yes, you do, in some cases (please read the discussion in the link below). The rule is: Always commit if you made change in DB (after DML commands), even with SELECT statement.
Use the COMMIT statement to end your current transaction and make permanent all changes performed in the transaction.
Read more: oracle - what statements need to be committed?
Thanks @Ben for the head up!
1 Comment
commit means "save the changes"
select statement does not change any data.
changing data can be done by Insert, update, delete statements (Data Manipulation language) .
2 Comments
You need to commit an sql statement only if you have performed a DML statement (INSERT, DELETE, UPDATE, MERGE) in your stored procedure. So, if you only queried the data, there is no need to commit.