declare @PI_ProdName varchar(100)
set @PI_ProdName = 'ss'
select * from HZ_Product_Info where PI_ProdName like '%'+@PI_ProdName+'%'
本文提供了一个使用T-SQL进行模糊查询的例子,展示了如何设置变量并利用该变量进行数据库表的查询。
declare @PI_ProdName varchar(100)
set @PI_ProdName = 'ss'
select * from HZ_Product_Info where PI_ProdName like '%'+@PI_ProdName+'%'
2419
1207

被折叠的 条评论
为什么被折叠?
