Re: select unique ? (solved thankyou :))

2008-02-16 Thread Richard
To: Richard Cc: mysql@lists.mysql.com Subject: Re: select unique ? Try: SELECT DISTINCT Colour FROM table; Or, if you want to do it correctly: SELECT Colour FROM table GROUP BY color; Richard wrote: Hello, I don't know if it is possible to do this with mysql alone ... Here goes : I've got

Re: select unique ?

2008-02-16 Thread Baron Schwartz
Hi, On Feb 15, 2008 10:26 AM, Price, Randall [EMAIL PROTECTED] wrote: Since both of these work, I was wondering which one would be faster. Here is an EXPLAIN on a similar test I did on one of my test tables. (NO index on field1, WinXP, MySQL 5.0.41-community-nt, SQLyog query window)

RE: select unique ?

2008-02-15 Thread Price, Randall
@lists.mysql.com Subject: Re: select unique ? Try: SELECT DISTINCT Colour FROM table; Or, if you want to do it correctly: SELECT Colour FROM table GROUP BY color; Richard wrote: Hello, I don't know if it is possible to do this with mysql alone ... Here goes : I've got a database list which

select unique ?

2008-02-14 Thread Richard
Hello, I don't know if it is possible to do this with mysql alone ... Here goes : I've got a database list which is like to following : Num | Name| Colour --- 1 | Harry | Red 2 | Tom | Blue 3

Re: select unique ?

2008-02-14 Thread peter lovatt
SELECT DISTINCT Colour FROM tablename Peter On 14/02/2008, Richard [EMAIL PROTECTED] wrote: Hello, I don't know if it is possible to do this with mysql alone ... Here goes : I've got a database list which is like to following : Num | Name| Colour

Re: select unique ?

2008-02-14 Thread Ben Clewett
Try: SELECT DISTINCT Colour FROM table; Or, if you want to do it correctly: SELECT Colour FROM table GROUP BY color; Richard wrote: Hello, I don't know if it is possible to do this with mysql alone ... Here goes : I've got a database list which is like to following : Num|Name|

Re: Select Unique?

2005-12-12 Thread Rhino
- Original Message - From: John Mistler [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Monday, December 12, 2005 12:34 AM Subject: Select Unique? I have two tables 'table1', 'table2' with a matching column 'column1'. How can I return all rows from table2 where the entry

Re: Select Unique?

2005-12-12 Thread Michael Stassen
Rhino wrote: - Original Message - From: John Mistler [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Monday, December 12, 2005 12:34 AM Subject: Select Unique? I have two tables 'table1', 'table2' with a matching column 'column1'. How can I return all rows from table2 where

Re: Select Unique?

2005-12-12 Thread John Mistler
wrote: - Original Message - From: John Mistler [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Monday, December 12, 2005 12:34 AM Subject: Select Unique? I have two tables 'table1', 'table2' with a matching column 'column1'. How can I return all rows from table2 where the entry for table2

Re: Select Unique?

2005-12-12 Thread John Mistler
? Thanks, John On Dec 12, 2005, at 9:57 AM, Michael Stassen wrote: Rhino wrote: - Original Message - From: John Mistler [EMAIL PROTECTED] To: mysql@lists.mysql.com Sent: Monday, December 12, 2005 12:34 AM Subject: Select Unique? I have two tables 'table1', 'table2' with a matching

Select Unique?

2005-12-11 Thread John Mistler
I have two tables 'table1', 'table2' with a matching column 'column1'. How can I return all rows from table2 where the entry for table2.column1 does not match any entries in table1.column1? SELECT * FROM table2 WHERE table2.column1 table1.column1 returns all the rows, rather than the unique

Re: Select Unique?

2005-12-11 Thread Michael Stassen
John Mistler wrote: I have two tables 'table1', 'table2' with a matching column 'column1'. How can I return all rows from table2 where the entry for table2.column1 does not match any entries in table1.column1? SELECT * FROM table2 WHERE table2.column1 table1.column1 returns all the rows,

RE: select unique records

2004-03-26 Thread Angelo Sulbaran
SELECT DISTINCTT * FROM a; -Original Message- From: nullevent [mailto:[EMAIL PROTECTED] Sent: Thursday, March 25, 2004 18:43 To: [EMAIL PROTECTED] Subject: select unique records Hi mysql, i have table 'a' with one field 'name', which contains many dublicated records, like SELECT

RE: select unique records

2004-03-26 Thread Angelo Sulbaran
Sorry...typo... SELECT DISTINCT * FROM a; -Original Message- From: Angelo Sulbaran [mailto:[EMAIL PROTECTED] Sent: Friday, March 26, 2004 08:34 To: [EMAIL PROTECTED] Subject: RE: select unique records SELECT DISTINCTT * FROM a; -Original Message- From: nullevent [mailto

select unique records

2004-03-25 Thread nullevent
Hi mysql, i have table 'a' with one field 'name', which contains many dublicated records, like SELECT * FROM a; +---+ | name | +---+ | Peter | | Ivan | | Peter | | Peter | | Dima | | ... | +---+ Now i want to see list of names (not repeated). How can i do it? Tnx,

RE: select unique records

2004-03-25 Thread Clive Luk
Use Select * from a Group by [your_field_name] -Original Message- From: nullevent [mailto:[EMAIL PROTECTED] Sent: Friday, March 26, 2004 9:43 AM To: [EMAIL PROTECTED] Subject: select unique records Hi mysql, i have table 'a' with one field 'name', which contains many dublicated

Re: select unique records

2004-03-25 Thread Ligaya Turmelle
PROTECTED] Subject: select unique records Hi mysql, i have table 'a' with one field 'name', which contains many dublicated records, like SELECT * FROM a; +---+ | name | +---+ | Peter | | Ivan | | Peter | | Peter | | Dima | | ... | +---+ Now i want to see