子查询中HQL限制

4
我希望在满足某些条件的情况下,将一个表的外键插入到另一个表中。结构类似于:
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关键字,但我想实现这样的功能。你有什么建议吗?

1个回答

3

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接