update config
set role = 'abc'
where id = '2'
and (select 1 from (
select 1 from config where role='abc' having count(1)<3
) t )
更新config表中id=2的role为abc 前提条件是 表中role为abc的数据小于3条的时候
update config
set role = 'abc'
where id = '2'
and (select 1 from (
select 1 from config where role='abc' having count(1)<3
) t )
更新config表中id=2的role为abc 前提条件是 表中role为abc的数据小于3条的时候