12 messages in com.mysql.lists.mysqlRe: Simple doubt
FromSent OnAttachments
Renish27 Nov 2006 18:45 
Peter Brawley27 Nov 2006 19:17 
Renish27 Nov 2006 19:23 
Renish27 Nov 2006 19:33 
Peter Brawley27 Nov 2006 19:48 
Renish27 Nov 2006 19:50 
Renish27 Nov 2006 19:57 
ViSolve DB Team27 Nov 2006 19:58 
Peter Brawley27 Nov 2006 20:11 
Renish27 Nov 2006 22:55 
Peter Brawley28 Nov 2006 07:24 
Peter Bradley28 Nov 2006 10:43 
Subject:Re: Simple doubt
From:Peter Brawley (pete@earthlink.net)
Date:11/28/2006 07:24:07 AM
List:com.mysql.lists.mysql

SELECT DISTINCT a,b,c,d,e FROM tbl;

Renish wrote:

How abt to return the distinct rows? ----- Original Message ----- From: "Peter Brawley" <pete@earthlink.net> To: "Renish" <kosh@gmail.com>; <mys@lists.mysql.com> Sent: Tuesday, November 28, 2006 11:48 AM Subject: Re: Simple doubt

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" <pete@earthlink.net> To: "Renish" <kosh@gmail.com> Cc: <mys@lists.mysql.com> 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