select sm.*
from system_mail sm
left join (SELECT u.mail_code
from user_mail u
where u.to_user = 1 ) um
on sm.mail_id = um.mail_code
where um.id is null.此SQL在mysql中运行良好,但在SpringData JPA中却错了,我如何在springdata中使用它?

发布于 2018-08-22 10:24:06
您应该尝试使用DB引擎使用nativeQuery = true运行SQL。
@Query(nativeQuery = true, value="...yourqueryhere...")https://stackoverflow.com/questions/51964386
复制相似问题