MySQL : Selecting alternative field if given field is empty
Posted
by Kyobul
on Stack Overflow
See other posts from Stack Overflow
or by Kyobul
Published on 2010-03-20T20:39:44Z
Indexed on
2010/03/20
20:41 UTC
Read the original article
Hit count: 285
mysql
Hi, I wonder if is it possible to run mysql command which can select an alternative field if the first given field is empty, on the same table.
Example : I have table called "posts" which have "intro" and "content". In the same statement I would like to select as a result "content" if "intro" is empty, but not having both in the result array.
Thanks in advance
© Stack Overflow or respective owner