mysql union 字段顺序 必须一致

union字段顺序必须一致,否则后面的字段名会失效,都会以第一个顺序为准

SELECT 1 AS a , 11 AS b UNION SELECT 2 AS b, 22 AS a
ab
111
222

此处评论已关闭