MySQL Forums
Forum List  »  Portuguese

Insert into com Condição IF
Posted by: Rui Cunha
Date: August 26, 2011 09:24AM

Boa tarde,


Depois de muitas horas perdidas a tentar encontrar a solução para inserir dados numa tabela mas de forma condicional tive de me resignar e procurar ajuda :p

Carissimos, o que pretendo no fundo é o seguinte:

Utilizando apenas STRINGS SQL pela linha de comandos

se 1 = 1 pretendo fazer:

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

apenas para exemplificar (sabendo que está errado) algo do genero:

> if 1=1 (insert into acct_table(AcctSessionId) VALUES ('teste') ELSE 'falso' END;


Desde já agradeço a atenção.

Melhores cumprimentos,
Rui Cunha

Options: ReplyQuote


Subject
Views
Written By
Posted
Insert into com Condição IF
9242
August 26, 2011 09:24AM
3003
November 21, 2011 05:51AM


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.