Unfortunately, creating an ALIAS will not work because IF is a keyword, and we don't allow keywords to be overriden by user defined functions.

I suggest that you instead use CASE .. WHEN

   http://h2database.com/html/grammar.html#case_when
   
https://dev.mysql.com/doc/refman/5.7/en/control-flow-functions.html#operator_case

which both MySQL and H2 supports.

--
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to