Mybatis学习笔记(三)—— 参数传递

 

 PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"

 "http://mybatis.org/dtd/mybatis-3-mapper.dtd">

 

 

 

 

        

 

 

select * from tbl_employee where id = #{id}

 

useGeneratedKeys="true" keyProperty="id">

INSERT INTO tbl_employee(last_name,email,gender)

VALUES(#{lastName},#{email},#{gender})        

 

UPDATE tbl_employee

SET last_name=#{lastName},email=#{email},gender=#{gender}

WHERE id=#{id}

 

DELETE FROM tbl_employee WHERE id=#{id}

 

 

 

 

 

 

         

 

 

 

 

 

 

你可能感兴趣的:(java,Mybatis)