MySQL Forums
Forum List  »  Newbie

Re: MAX(column1,column2)
Posted by: Jay Pipes
Date: July 25, 2005 12:59PM

SELECT a.id, a.name, b.salary, IF(a.last > b.last, a.last, b.last) AS last FROM a LEFT JOIN b ON a.id=b.id;

Jay Pipes
Community Relations Manager, North America, MySQL Inc.

Got Cluster? http://www.mysql.com/cluster
Personal: http://jpipes.com

Options: ReplyQuote


Subject
Written By
Posted
July 25, 2005 12:33PM
Re: MAX(column1,column2)
July 25, 2005 12:59PM
July 25, 2005 02:21PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.