日期:2014-05-17 浏览次数:20412 次
Select distinct GPLD_Group from V_AllUsers where GPLD_User in('grinm\ly','grinm\liuhz','grinm\lisl') Select distinct GPLD_Group from V_AllUsers where GPLD_User='grinm\huangzh'
SELECT CASE WHEN COUNT(1) > 0 THEN 0 ELSE 1 END FROM ( SELECT DISTINCT GPLD_Group FROM V_AllUsers WHERE GPLD_User IN ( 'grinm\ly', 'grinm\liuhz', 'grinm\lisl' ) EXCEPT SELECT DISTINCT GPLD_Group FROM V_AllUsers WHERE GPLD_User = 'grinm\huangzh' ) a
------解决方案--------------------
小的
except
大的
得到空,说明大的完全包含小的