List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:September 12 2003 6:13pm
Subject:RE: SELECT only unique records
View as plain text  
At 2:07 PM -0400 9/12/03, Dan Greene wrote:
>SELECT state_ID FROM financial_master WHERE category_ID = '1'
>becomes
>SELECT unique state_ID FROM financial_master WHERE category_ID = '1'
>-or-
>SELECT distinct state_ID FROM financial_master WHERE category_ID = '1'

DISTINCT will work, but UNIQUE will not.

DISTINCTROW is a synonym for DISTINCT.


>2 points !
>
>>  -----Original Message-----
>>  From: Comcast [mailto:m.devries@stripped]
>>  Sent: Friday, September 12, 2003 2:03 PM
>>  To: mysql@stripped
>>  Subject: SELECT only unique records
>>
>>
>>  I am sure this is a slam-dunk, but I am new to this and
>>  stumped ... thanks.
>>  I have the following statement, but I need it to pull only
>>  unique listings - I get repeated items.
>>
>>  SELECT state_ID FROM financial_master WHERE category_ID = '1'
>>
>>
>>
>>
>>
>
>--
>MySQL General Mailing List
>For list archives: http://lists.mysql.com/mysql
>To unsubscribe:    http://lists.mysql.com/mysql?unsub=1


-- 
Paul DuBois, Senior Technical Writer
Madison, Wisconsin, USA
MySQL AB, www.mysql.com

Are you MySQL certified?  http://www.mysql.com/certification/

Thread
SELECT only unique recordsComcast12 Sep
  • RE: SELECT only unique recordsRoger Davis12 Sep
  • RE: SELECT only unique recordsDathan Vance Pattishall12 Sep
  • Re: SELECT only unique recordsDwight Trumbower12 Sep
RE: SELECT only unique recordsDan Greene12 Sep
  • RE: SELECT only unique recordsPaul DuBois12 Sep
    • RE: SELECT only unique recordsPetre Agenbag15 Sep
      • Re: SELECT only unique recordsBruce Feist15 Sep
RE: SELECT only unique recordsAdam Fortuno12 Sep