I have a query which contains a subquery which is something like this
IFNULL((SELECT id FROM mytable WHERE id = 1), 'No')
It works OK, but I would like to return the string 'Yes' on success rather than the actual id of the row.
Is there any way to override the value it returns?
Thanks.
IFNULL((SELECT 'Yes' FROM mytable WHERE id = 1), 'No')
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With