开发者

How to adjust SQL LIKE function?

I want to make this kind of query:

create procedure something
  @name varchar(13)
as
begin

  select * 
   from WORKER
  where NAME LIKE "%@name%"

end

For input @name=ho, I want output every row that contains NA开发者_如何学编程ME which sounds ho,

for example HOuse, soHO, broHOw...


Select * from WORKER where Name Like '%' + @name + '%'


create procedure something
@name varchar(13)
as
begin
select * from WORKER
where NAME LIKE '%' + @name + '%'
end
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜