【数据库】insert语句
时间:2021-07-01 10:21:17
帮助过:22人阅读
<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语句
标签:test esc role 数据 null values value script ref