本文介绍了如何实现NOT LIKE作为containstable(全文查询)的搜索条件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我们想要检索columnName不包含thisWord的所有键,那么以下查询的搜索条件是什么?

What would be the search condition for the query below if we wanted to retrieve all the keys for which the columnName does not contain "thisWord" ?

SELECT [key] AS someValue
     FROM CONTAINSTABLE ( table ,columnName, ??what goes here?? )

注意:这是一个基于全文的搜索。

Note: This is a full-text based search.

推荐答案

我认为:

SELECT
   [key]
FROM tableName
   LEFT JOIN CONTAINSTABLE ( tableName ,columnName, '' ) AS ct ON tableName.[key] = ct.[key]
WHERE tc.[key] IS NULL

这篇关于如何实现NOT LIKE作为containstable(全文查询)的搜索条件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 10:31