Convert a mysql row to a column without using union and subquery

has a table:
A_number B_number
10 20

want to display as
item number
A 10
B 20

if you don"t use union and subqueries, and don"t create new tables or views, is there a way to accomplish the above transformation?
ask for advice.

Mar.02,2021

in fact, what kind of questions I am curious about is what application scenarios require this kind of functionality? Or is it just a purely technical discussion? If you are solving the actual business scenario, why not implement the following functions in memory through code logic after select comes out?


suggest you take a look at this article https://blog.csdn.net/wulanti.

Menu