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

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

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