如何在T-SQL中将带空格的字符串传递给'CONTAINS'

时间:2015-02-16 18:34:54

标签: sql sql-server-2012 filetable

如何在SQL Server 2012的“文件表”中将字符串This is a sample传递给CONTAINS

CONTAINS关键字不接受空格,括号。

SELECT * 
FROM Sample_FILETable 
WHERE CONTAINS (file_stream, 'This is a sample') ;

1 个答案:

答案 0 :(得分:0)

使用Like

SELECT * FROM Sample_FILETable where file_stream like '%This is a sample%'