Home » SQL & PL/SQL » SQL & PL/SQL » How to write a delete procedure?
How to write a delete procedure? [message #322372] Fri, 23 May 2008 05:06 Go to next message
grey.wombat
Messages: 3
Registered: May 2008
Junior Member
Hi,

I am trying to write a delete procedure that gets the ids from a table and based on those ids, runs a second delete procedure (since the contents is spread over several tables).

My problem is that I don't know a (nice) way of getting the ids and then ensuring that the rows still exist in database so that they can be deleted (i.e. the delete function has been run twice concurrently). That is, I would like the delete function to not do work that it doesn't/shouldn't be doing. If there is an example out there then just point me to the link.


Thanks.

Wombat.
Re: How to write a delete procedure? [message #322390 is a reply to message #322372] Fri, 23 May 2008 06:00 Go to previous messageGo to next message
S.Rajaram
Messages: 1027
Registered: October 2006
Location: United Kingdom
Senior Member
Welcome to the forum.

How about posting an example and also the scripts what you have tried so far and where you are stuck.

Also, Please spend some time reading the forum guidelines before posting it.

Regards

Raj
Re: How to write a delete procedure? [message #322391 is a reply to message #322372] Fri, 23 May 2008 06:13 Go to previous message
Michel Cadot
Messages: 64132
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Just execute "DELETE FROM MYTABLE WHERE <my conditions>"

Regards
Michel
Previous Topic: losing diacritic data after exporting
Next Topic: How To comapre The Two Table? (merged)
Goto Forum:
  


Current Time: Wed Dec 07 16:39:17 CST 2016

Total time taken to generate the page: 0.11685 seconds