CREATE PROCEDURE pro_fulltext_search
@searchKey varchar(50)
AS
set nocount on select * from titles contains(title,@searchKey)上面的代码会有错误提示:156 contains附近有语法错误。如何让contains(title,@searchKey) 中的@searchKey值的两边加上''呢?
@searchKey varchar(50)
AS
set nocount on select * from titles contains(title,@searchKey)上面的代码会有错误提示:156 contains附近有语法错误。如何让contains(title,@searchKey) 中的@searchKey值的两边加上''呢?
AS
set nocount on
exec('select * from titles contains(title,'''+@searchKey+''')')
set @sql =
'select * from titles contains(title,'''+@searchKey+''')'
exec (@sql)
@searchKey varchar(50)
)
AS
set nocount on
set @searchKey='"*'+@searchKey+'*"'
select * from titles contains(title,@searchKey) go
execute pro_fulltext_search 'base'或
execute pro_fulltext_search base base是要找的字符提示错误:execute pro_fulltext_search data
服务器: 消息 156,级别 15,状态 1,行 1
在关键字 'contains' 附近有语法错误。