Sort MySQL result set using comparison between 2 columns of same value type
Posted
by Kyobul
on Stack Overflow
See other posts from Stack Overflow
or by Kyobul
Published on 2010-06-18T14:51:29Z
Indexed on
2010/06/18
14:53 UTC
Read the original article
Hit count: 160
Hello,
I have a table containing last_updated_1
and last_updated_2
columns, used respectively for text and images update time on a post.
I wish I could get a result set of 10 rows based on all time last updated records contained in the 2 columns, ex. row 1 = last_updated_1
record, row 2 = last_updated_2
record, row 3 = last_updated_1
record, etc.
How could I compare inside a MySQL query the both columns values, to get unique & mixed result set ?
Thank you in advance for your help
© Stack Overflow or respective owner