t_user (name,sex,age) VALUES (u_name,u_sex,u_age);
SET u_id=LAST_INSERT_ID();
END
在UserMapper.xml中调用...)
BEGIN
UPDATE t_user SET name=u_name,sex=u_sex,age=u_age WHERE id=u_id;
END
在UserMapper.xml中调用...IN u_id INTEGER)
BEGIN
SELECT id,name,sex,age FROM t_user WHERE id=u_id;
END
在UserMapper.xml中调用...statementType="CALLABLE">
{call getUserById(#{id,mode=IN})}
创建UserDao
package com.dao;
import java.io.IOException...;
import java.io.InputStream;
import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.SqlSession