Home » SQL & PL/SQL » SQL & PL/SQL » Regarding Commit
Regarding Commit [message #242733] Mon, 04 June 2007 23:00 Go to next message
sibgat
Messages: 45
Registered: November 2006
Location: Chennai
Member

Hi,
Can we have commit inside a cursor?
Can we have commit inside a function?
In which case commit should not be used?
Thanks in advance
Regards
Sibghat
Re: Regarding Commit [message #242754 is a reply to message #242733] Tue, 05 June 2007 00:22 Go to previous messageGo to next message
Littlefoot
Messages: 20888
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
How would you write a cursor and put a COMMIT into it?

Here's a link to what Oracle says about committing.
Re: Regarding Commit [message #242770 is a reply to message #242733] Tue, 05 June 2007 01:12 Go to previous message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Can we have commit inside a cursor?
You can but you should not.

Can we have commit inside a function?
You can but you should not.

In which case commit should not be used?
Each time your business rules do not need to commit the current work.
In other words, you commit when and only when your business rules say you have to commit.

Regards
Michel
Previous Topic: Trigger to Call a SQL Script.
Next Topic: Forgot UserName and Password for SQL Plus..What NOW??:
Goto Forum:
  


Current Time: Sat Dec 03 08:11:16 CST 2016

Total time taken to generate the page: 0.12631 seconds