On Nov 24, 2003, at 6:25 PM, zzapper wrote:

I need to test if any values in a column are the same (or are unique)

eg (my made up syntax "Unique")

SELECT * from tbl_addresses WHERE txtName is UNIQUE;

How should this be done???

To get a list of all 'txtName' values that appear only once in the table:


        SELECT txtName
        FROM MyTable
        GROUP BY txtName
        HAVING count(*) = 1


___/ / __/ / ____/ Ed Leafe http://leafe.com/ http://opentech.leafe.com


-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to