MySQL Forums
Forum List  »  InnoDB

Re: INSERTing when there is a foreign key table
Posted by: Nolan Sunico
Date: January 21, 2009 08:09PM

Hi;

You can do it!
use stored procedure to be able to execute more than one commands.
first you need to create a cursor to check if the filename exists
second if it exist, you may either update the data row or you can delete it for good.
third if it does not exist, perform an inserts.
use the command:

call CheckInsert('Rudy');

CheckInsert is the name of the procedure
'Rudy' the name


The Programmer

Options: ReplyQuote


Subject
Views
Written By
Posted
2650
January 04, 2009 09:22PM
Re: INSERTing when there is a foreign key table
1898
January 21, 2009 08:09PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.