0

Do I need to issue commit command after running the stored function with select query?

1
  • If you are selecting from @dblink then you'd better rollback after that. Apr 25, 2014 at 16:04

3 Answers 3

1

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
0

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
0

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.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.