sql server 中使用 LIKE 语句 SqlParameter 使用

原本写的 select * from table where name like  '%@searchStr%'

怎么执行都不对,想想 参数是不能加 引号的

于是改为select * from table where name like   '%'+@searchStr+'%' 则正确执行

原文地址:https://www.cnblogs.com/90nice/p/3176360.html