当子查询内存在ORDER BY 字句时查询会报错
问题:当子查询内存在ORDER BY 字句时查询会报错SQL:
SELECT * FROM (
SELECT * FROM USER ORDER BY USER_CORD
) S.
解决办法:在子查询SQL语句SELECT 后加 TOP 100 PERCENT (查询出前百分比为100的数据,也就是查询出全部数据)
SQL:
SELECT * FROM (
SELECTTOP 100 PERCENT* FROM USER ORDER BY USER_CORD
)
文档来源:51CTO技术博客https://blog.51cto.com/u_15316096/3209783
页:
[1]