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 ? (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

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

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 ?

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 > --

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?

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: Sent: Monday, December 12, 2005 12:34 AM Subject: Select Unique? I have two tables 'table1', 'table2&#x

Re: Select Unique?

2005-12-12 Thread John Mistler
wrote: - Original Message - From: "John Mistler" <[EMAIL PROTECTED]> To: 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 table

Re: Select Unique?

2005-12-12 Thread Michael Stassen
Rhino wrote: - Original Message - From: "John Mistler" <[EMAIL PROTECTED]> To: 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 al

Re: Select Unique?

2005-12-12 Thread Rhino
- Original Message - From: "John Mistler" <[EMAIL PROTECTED]> To: 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

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,

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 uniqu

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

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 r

Re: select unique records

2004-03-25 Thread Ligaya Turmelle
OTECTED] > 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 records, like > SELECT * FROM a; >

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 cont

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,