1. 使用别名和<resultType>
select uname as name from user
2. 使用<resultMap>
<resultMap id="student" type="org.example.domain.User">
<id column="uno" property="no"></id>
<result column="uname" property="name" />
<result column="email" property="email" />
</resultMap>
<select id="selectUsers" parameterType="java.lang.String" resultMap="student">
select * from user where uname = #{name}
</select>