Question

I have a query for mysql where ifnull() is used.i want to convert it into ejb-ql. Problem here is that i dont find any substitute equivalent to ifnull() in ejb.

For eg:

ifnull(columnname,' ') as newcoulmn
Was it helpful?

Solution

You may try

  coalesce(columnname, ' ') as newcolumn

since coalesce is widely supported function when ifnull is MySql specific one

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top