Home > Database > Mysql Tutorial > mysql原生SQL查询错误出现异常“ Every derived table must have

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

WBOY
Release: 2016-06-07 16:25:57
Original
1654 people have browsed it

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 + " ) 
Copy after login

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

调整正常,其代码为:

select count(*) from ( " + hsql + " ) as atab
Copy after login

?

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template