请问一个ibatis关于null值奇怪的问题 本帖最后由 zhaohao19853 于 2012-12-21 16:58:23 编辑 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 ibatis 是可以插入null值的,只要数据库设置允许Null即可插入成功! to 1楼,ibatis能插入null值么?不是"null"噢??? <insert id="insert" parameterType="map"> INSERT INTO TABLENAME ( <trim suffixOverrides=","> <if test="userId != null and userId != ''">#{userId},</if> <if test="userName!= null and userName!= ''">#{userName},</if> </trim> ) VALUES ( <trim suffixOverrides=","> <if test="userId != null and userId != ''">userId,</if> <if test="userName!= null and userName!= ''">userName,</if> </trim> ) </insert> 第一次写JS代码,报错求助! hibernate 在数据库取出一个对象时的怪现象 我又来了!关于快速排序的问题 能否在一个应用下 控制另外一个应用的当前session 简单问题:Server如何向client传递处理结果? 类型转换问题? 用jsp能在数据库中创建一个新表吗? jdk1.4+Tomcat5.0,jsp不能调用javabean.请大家帮忙。请说详细点,我是初学者。谢谢! 乱码问题(看了很多贴子都不能解决)!!!!! jsp中时间问题--online 急!!mysqld-nt 启动不了 关于hibernate更新的问题。。
INSERT INTO TABLENAME (
<trim suffixOverrides=",">
<if test="userId != null and userId != ''">#{userId},</if>
<if test="userName!= null and userName!= ''">#{userName},</if>
</trim>
)
VALUES (
<trim suffixOverrides=",">
<if test="userId != null and userId != ''">userId,</if>
<if test="userName!= null and userName!= ''">userName,</if>
</trim>
)
</insert>