开发者

CONTAINSTABLE/ fullt text search

开发者 https://www.devze.com 2023-03-25 12:38 出处:网络
SELECT DISTINCT CP.* FROM ContentPack CP INNER JOIN [Content] C ON CP.ContentPackId = C.ContentPackId INNER JOIN
SELECT DISTINCT CP.* FROM ContentPack CP
    INNER JOIN [Content] C ON CP.ContentPackId = C.ContentPackId

 INNER JOIN
     CONTAINSTABLE([Content],Title, [Description],
                    'How can I make my own beers and ales') AS KEY_TBL
     ON C.Title = KEY_TBL.[KEY]

Here I am trying to do a search on table Content and returning records from ContentPack table matching the search

but am not开发者_开发百科 able to put it in correct syntax of CONTAINSTABLE


try this:

SELECT DISTINCT CP.* FROM ContentPack CP
    INNER JOIN [Content] C ON CP.ContentPackId = C.ContentPackId

 INNER JOIN
     CONTAINSTABLE([Content], (Title, [Description]),
                    'How can I make my own beers and ales') AS KEY_TBL
     ON C.Title = KEY_TBL.[KEY]
0

精彩评论

暂无评论...
验证码 换一张
取 消