MySQL Forums
Forum List  »  Newbie

Re: IF THEN
Posted by: Tom
Date: March 24, 2005 08:01AM

I'm using conditional statements in a batch file in a cron job, the if..then..end if example I asked about was a simplified version of what I'm trying to achieve, which is more like if @a <> @b then do something (insert rows whatever) else do something else (delete rows whatever).

Kind of related: how do you achieve a check for rows in a table? In T-SQL this would be
IF EXISTS(SELECT * FROM TableA)
/* do something to the data */
ELSE
/* insert or something */

Options: ReplyQuote


Subject
Written By
Posted
Tom
March 23, 2005 01:15PM
March 23, 2005 01:49PM
March 23, 2005 04:44PM
Re: IF THEN
Tom
March 24, 2005 08:01AM
March 24, 2005 08:23AM


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.