MySQL for default return value
| From: | Sebastian Stadtlich | Date: | Fri, 20 Oct 2000 10:35:05 +0000 |
| Subject: | MySQL for default return value | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-21361@lists.php.net to get a copy of this message | ||
HI there
in Oracle there is the statement NVL which can be used to return a default,
when a column is empty.
e.g. col NAME is empty => return 'UNKNOWN'
in Oracle :select nvl(NAME,'unknown') from Users
is there something similar in MySql ?????
yes i know i can do it in php, but i would like my DB handle stuff like
that.
Sebastian
_______________________________________________
Sebastian Stadtlich
mediaworx berlin AG
Fon (0 30) 2 75 80 - 25 6
Fax (0 30) 2 75 80 - 20 0