HQL 联表查询语句
select h from Hytxbz as h,Tgbzk as t where h.hytxbzid=t.hytxbzid and t.bztgid=:bztgid
如果想取得对应属性的话,也可以这样写
select h.hytxbzid from Hytxbz as h,Tgbzk as t where h.hytxbzid=t.hytxbzid and t.bztgid=:bztgid
注意:必须写 “as h”、 “as t” 后续用 h、t 指代表,不然会报错。