php-db | 2001041
Date: 04/11/01
- Next message: Ron Brogden: "Re: [PHP-DB] I know this has been asked before, but...."
- Previous message: SHAWN: "[PHP-DB] I know this has been asked before, but...."
- In reply to: SHAWN: "[PHP-DB] I know this has been asked before, but...."
- Next in thread: Ron Brogden: "Re: [PHP-DB] I know this has been asked before, but...."
- Reply: Ron Brogden: "Re: [PHP-DB] I know this has been asked before, but...."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
At 03:38 PM 4/11/2001 -0700, SHAWN wrote:
>What's the SELECT statment I want to use to find duplicate entries in a
>specific field?
SELECT column_name, count(*) AS doubles FROM some_table HAVING doubles > 1
GROUP BY colname
This should grab all instances where there are multiple instances of
"column_name" with the same value.
Cheers,
Ron
-----------------------------------------------------------------------------
Island Net AMT Solutions Group Inc. Telephone: 250 383-0096
1412 Quadra Toll Free: 1 800 331-3055
Victoria, B.C. Fax: 250 383-6698
V8W 2L1 E-Mail: support <email protected>
Canada WWW: http://www.islandnet.com/
-----------------------------------------------------------------------------
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe <email protected> For additional commands, e-mail: php-db-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Ron Brogden: "Re: [PHP-DB] I know this has been asked before, but...."
- Previous message: SHAWN: "[PHP-DB] I know this has been asked before, but...."
- In reply to: SHAWN: "[PHP-DB] I know this has been asked before, but...."
- Next in thread: Ron Brogden: "Re: [PHP-DB] I know this has been asked before, but...."
- Reply: Ron Brogden: "Re: [PHP-DB] I know this has been asked before, but...."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

