资料id 查看权限
800703 200,226,227,
782 200,227,229
783 169,227,330
查看权限存的是用户id,求: 登录id=227 则资料id为 800703、782、783
登录id=200 则资料id为 800703、782
800703 200,226,227,
782 200,227,229
783 169,227,330
查看权限存的是用户id,求: 登录id=227 则资料id为 800703、782、783
登录id=200 则资料id为 800703、782
from tb
where charindex(登陆id,查看权限)>0
charindex(','+登陆id+',' , ','+查看权限+',')>0
select * from tb where charindex(','+'227'+',' , ','+查看权限+',') > 0
--2
select * from tb where ','+查看权限+',') like '%,'+'227'+',%'