JPQL statement returning boolean value

后端 未结 3 2078
北海茫月
北海茫月 2020-12-29 18:24

Is it possible to write JPQL query like following:

select count(*) > 0 from Scenario scen where scen.name = :name

that would return true/fals

3条回答
  •  梦毁少年i
    2020-12-29 19:03

    What about just:

    select count(scen) > 0
    from Scenario scen where scen.name = :name
    

提交回复
热议问题