MYSQL; IF then SET statement -



MYSQL; IF then SET statement -

can't seem create below statement work, suggestions?

set @input := '1234567'; if length(@input)= 7 set id=@input; end if;

thanks in advance,

rene

try this:

set @input := '1234567'; select if(length(@input)=7, @input, '((something here))') id;

mysql

Comments

Popular posts from this blog

javascript - mongodb won't find my schema method in nested container -

Hibernate criteria by a list of natural ids -

ios - Lagging ScrollView with UIWebview inside -