MySQL Forums
Forum List  »  MySQL Query Browser

Re: Join two tables
Posted by: Pratik Asthana
Date: August 18, 2011 07:52AM

u need to use case statement for it and accompalish your task.


select case when year="2009" then isPaid end as 2009,
case when year="2010" then isPaid end as 2010,
case when year="2011" then isPaid end as 20111
from table2

Options: ReplyQuote

Written By
August 12, 2011 10:33AM
Re: Join two tables
August 18, 2011 07:52AM

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.