如何使用 Spring Data JPA 将数据从一个表插入到另一个表?
如何使用 Spring Data JPA 将数据从一个表插入到另一个表。 我有这样的查询
Insert into stack_tbl ( name , app_timestamp)
Select b.areaname as name, SYSTIMESTAMP as app_timestamp
From stack_main b
left join stack_tbl c
on c.name = b.areaname
where b.areaname IS NOT Null
AND c.name IS NULL
AND b.open = 'Yes'
GROUP BY b.areaname
ORDER BY b.areaname ASC
How can use spring data JPA to write this query in effective way. 我对 Spring Data JPA 非常陌生。我们有什么办法可以做到吗? 如果有人可以指导我为此编写 JPA 代码,谢谢
How to insert a data from one table to another using spring data JPA.
I have query like like this
Insert into stack_tbl ( name , app_timestamp)
Select b.areaname as name, SYSTIMESTAMP as app_timestamp
From stack_main b
left join stack_tbl c
on c.name = b.areaname
where b.areaname IS NOT Null
AND c.name IS NULL
AND b.open = 'Yes'
GROUP BY b.areaname
ORDER BY b.areaname ASC
How can use spring data JPA to write this query in effective way.
I am very much new in spring data JPA. Is there way we can do so.
Thankyou if someone can guide me in write the JPA code for this
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论