标签:like HERE 模糊 style 模糊查询 employee end har weight
1 ALTER proc [dbo].[proc_SelectEInfo] 2 ( 3 @id varchar (20), 4 @name varchar (30), 5 @sex char (4) 6 ) 7 as 8 if(@id=‘‘ and @name=‘‘ and @sex=‘‘) 9 select * from tb_Employee 10 else 11 begin 12 if(@id<>‘‘) 13 --if (@id<>‘‘ or @name<>‘‘ or @sex<>‘‘) 14 select * from tb_Employee where ID like ‘%[‘+@id+‘]%‘ 15 else if(@name<>‘‘) 16 select * from tb_Employee where Name like ‘%[‘+@name+‘]%‘ 17 else 18 select * from tb_Employee where Sex=@sex 19 end
标签:like HERE 模糊 style 模糊查询 employee end har weight
原文地址:https://www.cnblogs.com/neoo9901/p/11071924.html