gpt4 book ai didi

mysql - 如何结合大小写求和

转载 作者:行者123 更新时间:2023-11-30 23:21:20 24 4
gpt4 key购买 nike

这是我使用 hibernate 的代码,期待这样的事情

SUM( CASE WHEN model.voter.age 
between '"+18+"' and '"+25+"'
THEN 1 ELSE 0 END) as 18ageCount


org.springframework.orm.hibernate3.HibernateQueryException:
expecting IDENT, found '18' near line 1, column 325

我尝试了不同的组合但没有用

最佳答案

Expressionswhere 子句中使用的 hibernate。要解决此问题,您需要重写查询

select sum(1) from model.voter where age between 18 and 25 

关于mysql - 如何结合大小写求和,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15309215/

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