Session session=this.getSession;
string hql="select count(tb) from table tb";
Query query=session.createQuery(hql);
int count=(Integer)query.uniqueResult();
转载于:https://www.cnblogs.com/toSeeMyDream/p/4442607.html
本文演示了如何使用Session进行数据库操作,包括创建查询、执行SQL语句并获取唯一结果。
Session session=this.getSession;
string hql="select count(tb) from table tb";
Query query=session.createQuery(hql);
int count=(Integer)query.uniqueResult();
转载于:https://www.cnblogs.com/toSeeMyDream/p/4442607.html

被折叠的 条评论
为什么被折叠?