1. 通过别名解决不一致的问题
select tid id,tname name,tage age,score from student
2. 使用结果映射解决不一致的问题
<resultMap type="Student" id="studentMapper">
<id column="tid" property="id"/>
<result column="tname" property="name"/>
<result column="tage" property="age"/>
</resultMap>
<select id="selectAllStudent" resultMap="studentMapper">
select tid,tname,tage,score from student
</select>
<select id="selectStudentById" resultMap="studentMapper">
select tid,tname,tage,score from student where tid=#{tid}
</select>