IF statement in MySQL trigger -


this query code in mysql trigger.

if 1=2     select 'yes'; else     select 'no'; end if; 

but has following error:

if '1'='2'    select 'yes' error code: 1064. have error in sql syntax; check manual corresponds mysql server version right syntax use near 'if '1'='2'    select 'yes'' @ line 1 0.000 sec 

what solution?


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -