Error Code: 1222. The used SELECT statements have a different number of columns

前端 未结 1 738
感动是毒
感动是毒 2021-01-29 15:32

I\'v tried a few statements including joins, but have not been able to insert data from three other MySQL tables into one. On my last attempt, I received this error: Error Code:

相关标签:
1条回答
  • 2021-01-29 15:50

    The SELECT statement before the UNION keyword selects 4 columns but the SELECT statement after the UNION keyword selects only 1 column. You cannot build a UNION with different number of columns, thats the reason you get this error message about "different number of columns".

    0 讨论(0)
提交回复
热议问题