mapper.xml;dao实现类;sqlDevlope图形化工具;dos命令行     
 
 
ssm框架:写到mapper.xml文件中
 
 <mapper namespace="com.xdl.dao.DeptDao">
 <select >
     select * from DEPT order by DEPTNO
 </select>
 
 <insert >
 insert into DEPT (DEPTNO,DNAME,LOC)
 values (dept_seq.nextval,#{dname},#{loc})
 </insert>
 </mapper>
 
 
 
ssh框架:写到daoImpl类中
 
     @Resource
    private HibernateTemplate template;
    @Override
    public List<Dept> findAll() {
        String hql = "from Dept order by deptno";
        List list = template.find(hql);
        return list;
    }
 
 
 
 
 

相关文章:

  • 2021-06-17
  • 2021-09-18
  • 2022-12-23
  • 2021-09-19
  • 2022-03-08
  • 1970-01-01
  • 2021-11-29
  • 2021-08-27
猜你喜欢
  • 2022-12-23
  • 2022-02-18
  • 2021-09-30
  • 2021-11-06
  • 2022-12-23
  • 2022-12-23
  • 2021-10-04
相关资源
相似解决方案