摘要:
HQL实例:1.查询表中的所有记录:fromCategory2.带有where子句的条件查询:fromCategorycwherec.name>'c5'3.结果根据某一字段排序:fromCategorycorderbyc.namedesc(desc表示降序排列,asc表示升序排列)4.去除重复记录获得单一记录:selectdistinctcfromCategorycorderbyc.namedesc5.带有参数的查询:fromCategorycwherec.id>:minandc.id<:max。hql语句中’:min’表示的是参数,可以像jdbc中一样,为参 阅读全文
posted @ 2011-04-22 20:37
focusJ
阅读(1656)
评论(0)
推荐(0)