17,382
社区成员




select case when count(distinct code)>1 then 1 else 0 end flag from wms where id='1'
select case when cnt>1 then 1 else 0 end is_error
from
(select count(distinct code) cnt from wms where id='1') t
;
-- 换这个吧
select case when count(*) > 1 then 1 else 0 end from wms where id='1'
select distinct code from wms where id='1'