首页 > 数据库技术 > 详细

【数据库】insert语句

时间:2017-08-19 12:23:30      阅读:419      评论:0      收藏:0      [点我收藏+]
<insert id="insert" parameterType="net.huadong.entity.system.SystemRole">
insert into SYSTEM_ROLE
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="name != null">
name,
</if>
<if test="role_code != null">
role_code,
</if>
<if test="description != null">
description,
</if>
<if test="sort_id != null">
sort_id,
</if>
<if test="disabled != null">
disabled,
</if>
<if test="id != null">
id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null">
#{name},
</if>
<if test="role_code != null">
#{role_code},
</if>
<if test="description != null">
#{description},
</if>
<if test="sort_id != null">
#{sort_id},
</if>
<if test="disabled != null">
#{disabled},
</if>
<if test="id != null">
#{id},
</if>
</trim>
</insert>

【数据库】insert语句

原文:http://www.cnblogs.com/CESC4/p/7395606.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!