sql解析:这里是判断是否为null和空字符串,是就不更新,不是就更新
UPDATE sys_user
SET user_name =
IF
( user_name IS NULL OR LENGTH( user_name )= 0, user_name, '54354' )
WHERE
sys_user.id = 8;
sql解析:这里是判断是否为null和空字符串,是就不更新,不是就更新
UPDATE sys_user
SET user_name =
IF
( user_name IS NULL OR LENGTH( user_name )= 0, user_name, '54354' )
WHERE
sys_user.id = 8;