步骤:
1.增加 Student.xml中 对删除单个对象的支持 ,注意标签是 delete
<delete id="deleteStudentById" parameterClass="int">
delete from student where sid=#sid#
</delete>
2.在实现类中
public void deleteStudentById(int sid) {
try
{
sqlMapClient.delete("deleteStudentById",sid);
}
catch (SQLException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}
}