查询表中共有多少条记录
public Integer queryProductsCount() { Query query = session.createQuery("select count(*) from Products"); Integer count=(Integer) query.uniqueResult(); return count;}
2018-12-02 19:49:12
浏览 1416
public Integer queryProductsCount() { Query query = session.createQuery("select count(*) from Products"); Integer count=(Integer) query.uniqueResult(); return count;}
随时随地看视频慕课网APP
相关课程