共 14 篇文章 |
|
带输入输出参数的存储过程:sql代码:Sql代码 create procedure sptest.getnames(in lowestId int, out totalrows integer) reads sql data dynamic result sets 1 BEGIN ATOMIC declare cur cursor for select * from sptest.names where id >= lowestId; select count(*) into totalrows from sptest.names where id >= lowe... 阅244 转0 评0 公众公开 13-03-06 14:53 |
带输入输出参数的存储过程:sql代码:Sql代码 create procedure sptest.getnames(in lowestId int, out totalrows integer) reads sql data dynamic result sets 1 BEGIN ATOMIC declare cur cursor for select * from sptest.names where id >= lowestId; select count(*) into totalrows from sptest.names where id >= lowe... 阅10297 转23 评0 公众公开 13-03-06 14:50 |
阅4830 转6 评0 公众公开 12-11-29 12:37 |
<associationproperty="author" column="blog_author_id" javaType="Author"><id property="id"column="author_id"/><id property="id"column="post_id"/><associationproperty="author" column="blog_author_id"javaType=&q... 阅731 转5 评0 公众公开 12-11-01 12:53 |
Mybatis多参数查询映射。<select id="getXXXBeanList" parameterType="hashmap" resultType="XXBean">select 字段... from XXX where id=#{xxId} code = #{xxCode} </select><select id="getXXXBeanList" resultType="XXBean">select 字段... from XXX where id in<fo... 阅7520 转18 评0 公众公开 12-10-29 09:45 |
存储过程时候返回的游标[CURSOR]用过来的,MyBatis 的前身就是 iBatis 两者还很有区别,也有很大的改进,MyBatis 对sql的支持更好,更加灵活.不是spring官方的,应该是MyBatis团队的后续开发的在 MyBatis-Spring 中,确定地说,任意环境,数据源和 MyBatis 的事务管理器都会被忽略SqlSessionFactoryBean 会创建它自己的,使用这些值定制 MyBatis 的 ... 阅2078 转7 评0 公众公开 12-10-19 12:08 |
id = id;<select id="selectBlog" parameterType="int" resultMap="blogResult"> select B.id as blog_id, B.title as blog_title, B.author_id as blog_author_id, A.id as author_id, A.username as author_username, A.password as author_password, A.email as author_email, A.bio as author_bio fro... 阅12151 转59 评1 公众公开 12-10-19 11:37 |
阅795 转0 评0 公众公开 12-10-19 10:42 |
MyBatis学习 之 一、MyBatis简介与配置MyBaits+Spring+MySql一、MyBatis简介与配置MyBatis+Spring+MySql1.1MyBatis简介。需要使用的Jar包:mybatis-3.0.2.jar(mybatis核心包)。1.2MyBatis+Spring+MySql简单配置1.2.1搭建Spring环境。3,在pom.xml中加入所需要的jar包(spring框架的、mybatis、mybatis-spring、junit等);1.2.3.4创建MyBatis... 阅143 转自旭龙 公众公开 12-09-24 14:10 |
-- 更新学生信息 --><update id="updateStudent" parameterType="StudentEntity">UPDATE STUDENT_TBLSET STUDENT_TBL.STUDENT_NAME = #{studentName},STUDENT_TBL.STUDENT_SEX = #{studentSex},STUDENT_TBL.STUDENT_BIRTHDAY = #{studentBirthday},STUDENT_TBL.CLASS_ID = #{classEntity.classID}WHERE STUDENT_T... 阅36 转自旭龙 公众公开 12-09-24 13:45 |