 <p>You can use following doc type. However I find some discrepancy in the code you have copied. Are you sure of INSERT and SELECT statements. I hope its copy mistake</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"&gt; &lt;mapper namespace="com.javacodegeeks.snippets.enterprise.UserMapper"&gt; &lt;select id="addUser" parameterType="int" resultType="com.javacodegeeks.snippets.enterprise.User"&gt; insert into * from users where id = #{id} &lt;/select&gt; &lt;select id="getUser" parameterType="int" resultType="com.javacodegeeks.snippets.enterprise.User"&gt; select * from com.javacodegeeks.snippets.enterprise.User where id = #{id} &lt;/select&gt; &lt;/mapper&gt; </code></pre>