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

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

WBOY
WBOYOriginal
2016-06-07 16:25:571584browse

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

?

Statement:
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
Previous article:mysql学习-sql根本使用Next article:HBase入门篇4–存储