delete from channel_users where channel_id = #{channelId} INSERT INTO channel_users (channel_id, uid) VALUES (#{channelId}, #{value}) delete from channel_users WHERE channel_id = #{channelId} AND uid = #{uid}