18.12.2011, 02:54
Quote:
Theoretically, this should work: (credits)
Код:
SELECT COUNT('Email Address') AS NumOccurrences FROM Accounts HAVING ( COUNT(NumOccurrences) >= 1 ) You can just return the result, 0 if no, higher (or equal) 1 if so. Also, a little tip: It's really not wise to use spaces for column names, it's more problematic. Use camel case. |
Код:
SELECT email FROM users GROUP BY email HAVING ( COUNT(email) = 1 )