Have you tried something like this?
SELECT * FROM table_name where col1=col2 and col2=col3 and col3=col4 and
col4!=col5;



Greg Skouby wrote:
> 
> Hello,
> 
> I have a table which consists of 5 columns.
> There are a large number of rows that have the same values for the
> first 4 columns and the last column is the only thing that differs.
> I would like to grab all the rows that have these identical
> columns so I can store it into one rows with all the different
> values in the last column of just one row. What would the syntax
> be to grab all the rows that have identical data in
> the first 4 columns? I know this is pretty trivial but everthing
> I try seems to be wrong. Thanks for your help.
> 
> Greg
> 
> ---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/manual.php   (the manual)
>    http://lists.mysql.com/           (the list archive)
> 
> To request this thread, e-mail <[EMAIL PROTECTED]>
> To unsubscribe, e-mail <[EMAIL PROTECTED]>
> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

-- 
Angela Curtis
Innovative Business Consultants
http://www.ibc2001.com

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to