-1
我的SQL是查詢春季儲存庫
SELECT formid
FROM (SELECT formid, COUNT(*) cc FROM formevalremarks
WHERE completed='Y' GROUP BY formid)
WHERE (formid, cc) IN
(SELECT formid, COUNT(*) dd FROM formevalremarks GROUP BY formid)
如何在春天回購它寫在@Query
????
我試過..
@Query("select f.formId from (SELECT f.formId ,COUNT(*) f.cc FROM FormEvalRemarks f WHERE f.completed='Y' GROUP BY f.formId) where (f.formId ,f.cc) in (SELECT f.formId ,COUNT(*) f.dd FROM FormEvalRemarks f GROUP BY f.formId)")
;
List<Long> complForms()
它越來越... org.springframework.beans.factory.BeanCreationException
你試過了什麼? – Rembo
通過啓用'nativeQuery = true',您可以在'@Query(custome SQL)'中使用本機查詢,但會鬆散數據庫。 – Rembo