Home >Database >Mysql Tutorial >HQL多表联合查询的问题

HQL多表联合查询的问题

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-07 14:58:361167browse

HQL多表联合查询的问题 HQL多表查询只想查询出要的对象的时候 from AAA as a,BBB as b where a.a = b.a 这里取出会是俩个对象 HQL想要只取出一个对象的时候可以这样写 select a from AAA as a,BBB as b where a.a = b.a

HQL多表联合查询的问题

 

HQL多表查询只想查询出要的对象的时候

 

from AAA as a,BBB as b where a.a = b.a

 

这里取出会是俩个对象

 

HQL想要只取出一个对象的时候可以这样写

 

select a  from AAA as a,BBB as b where a.a = b.a

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