MySQL Forums
Forum List  »  General

Insert into with IF condition
Posted by: Rui Cunha
Date: August 26, 2011 09:33AM

Hi,

After many hours trying to reach the answer to my problem i eventually decided to ask help to experts ;)

What i need is:

Using only SQL STRING in the command line:

if 1 = 1 i want to:

> INSERT into acct_table(AcctSessionId) VALUES ('test');

Just to give a example (i know this is wrong) something like this:

> if 1=1 (insert into acct_table(AcctSessionId) VALUES ('test') ELSE 'false' END;


Thanks in advance.

Best regards,
Rui Cunha

Options: ReplyQuote


Subject
Written By
Posted
Insert into with IF condition
August 26, 2011 09:33AM
September 03, 2011 07:07AM


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.