mysql union different number of columns

前端 未结 3 602
轻奢々
轻奢々 2021-01-02 11:47

I know union queries have to have the same number of columns. I\'m trying to get results from the table comments and results from the table strings

3条回答
  •  误落风尘
    2021-01-02 12:19

    Add empty columns (null as columnName) to the query that has fewer columns. You should avoid using * in this case, to have better control on order of columns in both queries.

提交回复
热议问题