一般情况下是SQL语句:
Select * From Users Where UserName Like ‘Lin%‘
Select * From Users Where UserName Like ‘Lin%‘
采用参数化SQL
DECLARE @pattern VARCHAR(MAX) SET @pattern=Lin%‘ Select * From Users Where UserName Like @pattern
SQL Server参数化查询中应用Like,布布扣,bubuko.com
原文地址:http://www.cnblogs.com/sunsoftresearch/p/3819269.html