I want to return all columns, and anywhere there's a NULL to say 'hey' instead.

But this doesn't work

SELECT IFNULL(*, 'hey') FROM $table
有帮助吗?

解决方案

You have to do this one column at a time.

Functions do not generally take * as an argument.

select ifnull(col1, 'hey'), . . .
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top