34,593
社区成员
发帖
与我相关
我的任务
分享
Select * from TB where '张三' in (NAME) And 26 in (AGE)
select * from tb
where ','+name+',' like '%,张三,%' and ','+age+',' like '%,6,%'
--严格一点:
Select * from TB where ','+Name+',' like '%,张三,%' And AGE=26
--或者:
Select * from TB where Charindex(',张三,',','+Name+',')>0 And Age=26
Select * from TB where Name like '%张三%' And AGE=26
Select * from TB where Name = '张三' And AGE=26