i am just getting the result from a query like this
user_id
108
183
172
129
158
178
117
104
and i want the result in this format
m1 m2 m3 m4 m5 m6 m7 m8
108 183 172 129 158 178 117 104
can anybody help me
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use GROUP_CONCAT to get a similar resultset :
Otherwise if you want to create a new column for each row in the result set you can go with a CASE, but the values or the ranges of values must be hard coded :
Or by ranges :