2

Possible Duplicate:
How do I display mysql table row as column

I have a column days in which there are two rows day1 and day2, now I need to display days rows as two separate columns.

table name : test

column
 **days**
   day1
   day2

AFTER RUNNING THE QUERY IT SHOULD BE LIKE :

coum1      couml2
day1        day2

Need help with doing it in MySQL.

0

1 Answer 1

0

I'm note sure if I exactly get what you want' but I think the result should be something like:

SELECT days.days as coum1,  days2.days as coum2 from days join days as days2 WHERE days.days = 'day1' AND days2.days = 'day2';
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.