- 11
- 0
- 约3.28万字
- 约 19页
- 2016-10-14 发布于贵州
- 举报
Hibernae查询语句及Callback使用方法
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
您可能关注的文档
- GMA-ES-A-IN-011 安全生产责任制 A-1.docx
- GMP2010修订 洁净区悬浮粒子测试管理规定.doc
- GMP清洗机用需求.doc
- GMP药厂库房境温湿度监控系统.docx
- Google pp Engine的部署环境平台相关元模型.docx
- Google 十大价值观.docx
- Google云算核心技术大揭秘.docx
- GPMR国家重实验室收费标准.doc
- GPRS业务行信息化解决方案模板.doc
- GRE词汇考试率统计表.doc
- 2025年新人教版7年级英语上册全册课件.pptx
- 2025年秋季新人教版历史7年级上册全册教学课件.pptx
- 2025年秋新人教版英语7年级上册全册教学课件(新版教材).pptx
- 2025年人教版历史7年级上册全册课件(新版教材).pptx
- 2024年新沪科版物理8年级上册全册教学课件.pptx
- 2025年秋季新星球版地理7年级上册全册教学课件.pptx
- 2024年秋季新沪科版8年级上册物理全册教学课件.pptx
- 2024年秋季人教版7年级上册语文全册教学课件(考点精讲版).pptx
- 2025年秋新外研版3年级上册英语全册教学课件(新版教材).pptx
- 2024年新外研版3年级上册英语全册课件.pptx
原创力文档

文档评论(0)