From: Peter Brawley Date: November 28 2006 3:48am Subject: Re: Simple doubt List-Archive: http://lists.mysql.com/mysql/203562 Message-Id: <456BB197.1090709@earthlink.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit >But if I do like this.. >select distinct store, price from Item >will both become distinct? SELECT DISTINCT returns one result row per distinct _result_ row (which will be the same as 'per distinct table row' only if all table columns are selected). >The questiion is How will capture the entries >which are entered more than once... The set of repeated result rows is the set of result rows discarded by SELECT DISTINCT. Which do you want to return, the distinct rows, or the dupes? PB Renish wrote: > > But if I do like this.. > select distinct store, price from Item > > will both become distinct? > > How can I make only one distinct ie "store" distinct > > regards, > ----- Original Message ----- From: "Peter Brawley" > > To: "Renish" > Cc: > Sent: Tuesday, November 28, 2006 11:18 AM > Subject: Re: Simple doubt > > >> SELECT DISTINCT ... >> >> Renish wrote: >>> Gurus, >>> >>> How do I go about to selecting an item which is repeated more than >>> one in a field in a table. >>> >>> For example >>> >>> Item table >>> >>> Mango >>> Orange >>> Carrot >>> Papaya >>> Mango >>> Mango >>> >> >> >> -- >> No virus found in this outgoing message. >> Checked by AVG Free Edition. >> Version: 7.1.409 / Virus Database: 268.14.18/554 - Release Date: >> 11/27/2006 >> > > -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.409 / Virus Database: 268.14.18/554 - Release Date: 11/27/2006