开发者

regarding converting sql to hql

开发者 https://www.devze.com 2023-01-31 09:41 出处:网络
how to select column\'s value as null in hql? ex: In sql select null as empname from emp; in sql In hql

how to select column's value as null in hql?

ex: In sql

 select null as empname from emp; in sql

   In hql   

ex: select emp.empname as col1 from Employee emp;

I want to select empname' value as null as explained in the above sql query

An开发者_Python百科


You can use cast function. Like this,

select cast(null as char) as hede from emp e 

Or use quotes and change your controls to empty checks.

select '' as hede from emp e 
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号