- DAO层
Integer updateUserList( @Param(value = "list") ListuserIdList);
2.xml语句
UPDATE user_info WHEN user_id =#{cus.userId} THEN #{cus.age} WHEN user_id =#{cus.userId} THEN #{cus.address} user_id =#{cus.userId}
3.执行输出
UPDATE user_info SET age = CASE WHEN user_id = 30069 THEN 18 WHEN user_id = 30068 THEN 20 END, address = CASE WHEN user_id = 30069 THEN '浙江杭州' WHEN user_id = 30068 THEN '四川成都' END WHERe user_id = 30069 OR user_id = 30068
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)