2016年12月4日

hql语句cast用法

摘要: hql中cast为转换函数 cast(a as b);a是要转换的数据,b是目标类型(不是数据库类型名,是hibernate类型名:比如目标类型是varchar,必须写string) eg:select * from 表 where cast(要转换的字段名 as string)<>'';//查出某 阅读全文

posted @ 2016-12-04 10:18 anlove 阅读(3209) 评论(0) 推荐(0) 编辑

导航