当前位置: 代码迷 >> 综合 >> unexcept token. token is : 'union', at line 33 column 2, token type is 'Keyword'
  详细解决方案

unexcept token. token is : 'union', at line 33 column 2, token type is 'Keyword'

热度:55   发布时间:2023-12-15 03:28:24.0

两表合并时 使用union all 必须给表设置别名、还得注意明确字段

e.g:

select userInfo1.userName as uName,userInfo2.passWord  as pw from (select * from user) userInfo1

union all

select userInfo2.userName as uName,userInfo2.passWord  as pw from (select * from user) userInfo2

  相关解决方案