I want to write a hql as like this
Select * from tableName where columnName= null or columnName=0
As i am new to this please help me out
You could try something like this.
select column1, column2,....
from tableName
where (columnName = null or columnName = 0)
There are some useful tutorials below:
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
你可以简单地写
FROM PojoName pojo WHERE pojo.property is null or pojo.property=0
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.