欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  数据库

mysql原生SQL查询错误出现异常“ Every derived table must have

程序员文章站 2022-05-30 13:40:21
...

mysql原生SQL查询异常出现错误“ Every derived table must have its own alias” select count(*) from ( " + hsql + " ) ?移植了部分从oracle查询语句过来,结果所有分页查询都有问题,经检查原来是MYSQL 需要在表后面增加别名的规则限制; 调整正常,其代

mysql原生SQL查询异常出现错误“ Every derived table must have its own alias”
select count(*) from ( " + hsql + " ) 

?移植了部分从oracle查询语句过来,结果所有分页查询都有问题,经检查原来是MYSQL 需要在表后面增加别名的规则限制;

调整正常,其代码为:

select count(*) from ( " + hsql + " ) as atab

?