此代码返回我想要的结果但我在MySQL中需要它
先谢谢
SET @searchstring = 'hot spicy'
set @SQLStatement = 'Select * FROM dbo._TEST_'
IF LEN(@searchstring)>0
SET @SQLStatement=@SQLStatement+ ' WHERE tast LIKE '+CHAR(39)+'%'
SET @searchstring=Replace (@searchstring,' ', '%'+CHAR(39)+' AND tast LIKE '+CHAR(39)+'%')
IF LEN(@searchstring)>0
SET @SQLStatement=@SQLStatement+ @searchstring +'%'+ CHAR(39)
IF LEN(@searchstring)>0
EXECUTE sp_executesql @SQLStatement
GO>