Forum Moderators: coopster
Also, if the email column can contain NULL values, you may want to watch your operation carefully as it may not behave as you expect. From the MySQL Manual:
The concept of the NULL value is a common source of confusion for newcomers to SQL, who often think that NULL is the same thing as an empty string "". This is not the case! For example, the following statements are completely different:
mysql> INSERT INTO my_table (phone) VALUES (NULL);
mysql> INSERT INTO my_table (phone) VALUES ("");
.
.
.
To look for NULL values, you must use the IS NULL test. The following shows how to find the NULL phone number and the empty phone number:
mysql> SELECT * FROM my_table WHERE phone IS NULL;
mysql> SELECT * FROM my_table WHERE phone = "";