- DELIMITER &&
- CREATE PROCEDURE create_table ()
- LANGUAGE SQL
- BEGIN
- CREATE TABLE `user` (
- `id` INT(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
- `real_name` VARCHAR(8) NOT NULL COMMENT '姓名',
- `age` INT(3) DEFAULT NULL COMMENT '年龄',
- PRIMARY KEY (`id`)
- ) ENGINE=INNODB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
- END &&
- DELIMITER ;
-
-
<select id="getCusKey" parameterType="map" statementType="CALLABLE" resultType="string">
<![CDATA[
{call user (#{INPARA,mode=IN,jdbcType=VARCHAR},#{OUTPARA,mode=OUT,jdbcType=VARCHAR})} //这里是存储过程接收返回结果的写入map中的字段
]]>
</select>
创建存储过程学习-
最新推荐文章于 2023-03-02 22:37:11 发布