2 u012996716 u012996716 于 2013.11.30 16:26 提问

hql 语句不知道怎么拼的,求解,拜托了

sql语句是: select * from COURSE where course_grade='高三' order by last_date desc
我写的hql语句是: "from Course as a where a.courseGrade="+"'高三'"+"0rder by a.lastDate desc"

但是报这个错:org.hibernate.hql.ast.QuerySyntaxException: unexpected token: 0 near line 1, column 66 [from com.mstf.happyStudy.po.Course as a where a.courseGrade='高三'0rder by a.lastDate desc]

个位大神求解,感觉应该很简单,但是我找不到了

1个回答

junjie_326168998
junjie_326168998   2013.11.30 17:23

from Course as a where a.courseGrade="+"'高三'"+"0rder by a.lastDate desc Order by 那个空下格看看

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!