开发者

jpa 2.0 criteria api expression for sql minus

开发者 https://www.devze.com 2023-03-26 00:28 出处:网络
How do you create a jpa Criteria express开发者_高级运维ion that is equivalent to the sql minus statement

How do you create a jpa Criteria express开发者_高级运维ion that is equivalent to the sql minus statement

example

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


Minus does not exist but you can do something like that:

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

精彩评论

暂无评论...
验证码 换一张
取 消