我想像这样编写一个hql
Select * from tableName where columnName= null or columnName=0
我是新手,请帮帮我
答案 0 :(得分:0)
你可以尝试这样的事情。
select column1, column2,....
from tableName
where (columnName = null or columnName = 0)
下面有一些有用的教程:
http://www.tutorialspoint.com/hibernate/hibernate_query_language.htm http://www.roseindia.net/hibernate/index.shtml http://dev.wavemaker.com/wiki/bin/Dev/HqlTutorial#HHQLWHEREClause
答案 1 :(得分:0)
你可以简单地写
FROM PojoName pojo WHERE pojo.property is null or pojo.property=0