MySQL Forums
Forum List  »  Newbie

Re: Selecting specified values from different coulmns
Posted by: shreehari srinivasan
Date: October 10, 2022 04:54PM

Thanks a lot for trying to help me, I tried this, but I need the name of game under their respective coulmn itself. But by using this union clause, I'm getting output like this

mysql> select game1 from sports where game1 like'%ball'
-> union
-> select game2 from sports where game2 like'%ball';
+------------+
| game1 |
+------------+
| basketball |
| football |
+------------+

I need basket ball to be under game1 while football to be under game2
Please let me know if you know a way to do so... :)

Options: ReplyQuote


Subject
Written By
Posted
Re: Selecting specified values from different coulmns
October 10, 2022 04:54PM


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.