- 2
- 0
- 约21.34万字
- 约 20页
- 2017-08-04 发布于河南
- 举报
1.from子句
from Person
表明从Person持久化类中选出全部的实例。
推荐:from Person as p
2.select子句
select from Person as p
select .firstName from Person as p
select new list(, p.address) from Person as p
select new ClassTest(, p.address) from Person as p (有前提)
select as personName from Person as p
select new map( as personName) from Person as p (与new map()结合更普遍)
3.统计函数查询:
1: count() 统计记录的条数
2: min() 求最小值
3: max() 求最大值
4: sum() 求和
4: avg() 求平均值
//取得Student的数量
Query query=session.createQuery(select count(*) from Student)
//avg()取得Student平均年龄
Query query=session.c
您可能关注的文档
- EIZ125与EBZ56离心式压缩机检修规程 初稿.doc
- ESEND 软体简介和操作.doc
- 2第二章化学键和分子结构 - 副本.ppt
- Excel VBA——如何保护好您VBA作品!!.doc
- Excel 数据区域或表中数据进行排序.doc
- EXCEL操作指南--频数分布表与统计图.doc
- 2机构组成2010.ppt
- 02计算机中数据信息表示.ppt
- fast paxos算法和zookeeper leader选举源代码分析.doc
- Fiejrew制造业工厂常用英文和缩写词汇大全.doc
- 2025-2026学年全国青少年海洋科技创新大赛船舶设计题.docx
- 2025-2026学年全国青少年足球训练营.docx
- 2025-2026学年大学生跆拳道竞技 hidden 技能评分.docx
- 2025-2026学年全国青少年武术散打竞技能力选拔真题.docx
- 2026年上海国际都会《行测》(言语理解)解析卷.docx
- 2026年四川省公务员考试《申论》(市级卷)精选模拟题.docx
- 2026年天津滨海新区《行测》(L类)真题详解.docx
- 2026年天津市公务员考试《言语理解》真题解析.docx
- 2026年新疆维吾尔自治区公务员考试《申论》(生态文明建设专题)真题卷.docx
- 2026年新疆维吾尔自治区公务员考试《行政职业能力测验》(C类)模拟题.docx
原创力文档

文档评论(0)