子查询查询中的HQL限制
问题描述:
我想根据某些标准将一个表的外键插入另一个表的外键。结构就像子查询查询中的HQL限制
insert into CustomerResult(customer,draw) select c.idCustomer, from Customer c,Draw d where ..... and c.idCustomer in (select cc.idCustomer from Customer cc where ..... limit 10)
这里我想插入只修复符合特定条件的记录号。我知道hql没有限制关键字,但希望像这样实现。任何建议?
答
我不认为你想要做什么(在子查询中使用limit
)是由Hibernate直接支持的。看看这些以前的答案: