MySQL Need help constructing query: join multiple tables into single row

后端 未结 3 1828
走了就别回头了
走了就别回头了 2021-01-13 17:55

Forgive me if this question has been asked and answered, I\'ve searched and found a few that look similar but I\'m too much of a novice with SQL to adapt them to my needs. A

3条回答
  •  爱一瞬间的悲伤
    2021-01-13 18:24

    The output you're asking for is not a relation, since its attributes don't have unique names. So it's unreasonable to expect a relational database system to produce such a result. Which is not to say that some database systems can break the relational model and produce non-relational results in some cases; but this isn't likely to be one of them.

    So you should instead have the application take the relation as input and transform it to the output you want. From the RDBMS perspective, that's a major part of the role of the application.

提交回复
热议问题