SQL字符串使用LIKE参数
周祥·
2015-01-27·
5 次阅读
记录下来 以备后用
SET @sql = 'SELECT * FROM authors WHERE address LIKE '+char(39)+char(37)+@str+char(37)+char(39)
set @sql= 'Select top 10 * From news Where news_title like ''%'+@news_title+'%'''