Re: use of wildcards or regular expressions in IFNULL, how to create a view that substitutes NULL by 0?

2008-09-06 Thread Brent Baisley
There is no way that I know of to reference every field in a table without using a stored procedure. If you really need to do something like that, and you will be adding new columns frequently, then it's most likely an indication that your table structure is not normalized. Those columns

use of wildcards or regular expressions in IFNULL, how to create a view that substitutes NULL by 0?

2008-09-04 Thread drflxms
Dear MySQL specialists, this is a MySQL-newbie question: I want to create a view of a table, where all NULL-values are substituted by 0. Therefore I tried: SELECT *, IFNULL(*,0) FROM table Unfortunately IFNULL seems not to accept any wildcards like * as placeholder for the column-name. REGEXP