一、sql语句
<select id="select" paramterType="String" resultType="Map">
select NAME,AGE
from student
where ID=#{id}
</select>
二、dao层
public interface StuDao {
Map<String,String> select(String id);
}
三、实现应用
Map<String,String> map = stu.select(id);
map.get("NAME");