MySQL REGEXP: matching blank entries
Posted
by Erwin Paglinawan
on Stack Overflow
See other posts from Stack Overflow
or by Erwin Paglinawan
Published on 2010-06-17T23:40:59Z
Indexed on
2010/06/17
23:53 UTC
Read the original article
Hit count: 455
Hi,
I have this SQL condition that is supposed to retrieve all rows that satisfy the given regexp condition:
country REGEXP ('^(USA|Italy|France)$')
However, I need to add a pattern for retrieving all blank country values. Currently I am using this condition
country REGEXP ('^(USA|Italy|France)$') OR country = ""
How can achieve the same effect without having to include the OR clause?
Thanks, Erwin
© Stack Overflow or respective owner