gpt4 book ai didi

sql - sql minus的jpa 2.0标准api表达式

转载 作者:行者123 更新时间:2023-12-04 03:10:43 25 4
gpt4 key购买 nike

如何创建等价于sql minus语句的jpa Criteria表达式

例子

  SELECT mod_code
FROM SRS.Table1
MINUS
SELECT mod_code
FROM SRS.Table2;

最佳答案

负号不存在,但你可以这样做:

select t1.mod_code from Table1 t1 where not exists 
(select t2 from table2 t2 where t2.mode_code = t1.mode_code)

关于sql - sql minus的jpa 2.0标准api表达式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6923801/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com