当前位置: 数据库>mysql
Mysql联合查询UNION和Order by同时使用报错问题的解决办法
来源: 互联网 发布时间:2014-10-14
本文导语: 因此,常常出现这样的错误 代码如下:select * from [IND] where INDID>10unionselect * from [IND] where INDID10 order by INDID descunionselect * from [IND] where INDID10unionselect * from [IND] where INDID
因此,常常出现这样的错误
代码如下:
select * from [IND] where INDID>10
union
select * from [IND] where INDID10 order by INDID desc
union
select * from [IND] where INDID10
union
select * from [IND] where INDID