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: 21148
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: 65144
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: What is the difference between SOME and ANY
Next Topic: Complex Sql
Goto Forum:
  


Current Time: Sun Aug 20 03:11:58 CDT 2017

Total time taken to generate the page: 0.01147 seconds