What kind of field is this? The IN operator cannot be used with a single field, but is meant to be used in subqueries or with predefined lists:

-- subquery
SELECT a FROM x WHERE x.b NOT IN (SELECT b FROM y);
-- predefined list
SELECT a FROM x WHERE x.b NOT IN (1, 2, 3, 6);

If you are searching a string, go for the LIKE operator (but this will be slow):

-- Finds all rows where a does not contain "text"
SELECT * FROM x WHERE x.a NOT LIKE '%text%';

If you restrict it so that the string you are searching for has to start with the given string, it can use indices (if there is an index on that field) and be reasonably fast:

-- Finds all rows where a does not start with "text"
SELECT * FROM x WHERE x.a NOT LIKE 'text%';
Answer from Vegard Larsen on Stack Overflow
🌐
Alteryx Community
community.alteryx.com › t5 › Alteryx-Designer-Desktop-Discussions › Is-does-not-contain-the-same-as-not-like-in-the-SQL-editor › td-p › 744388
Is 'does not contain' the same as 'not like' in the SQL editor?
April 8, 2021 - Would pick up where the FieldName contains string. ... In SQL you probably want to use "VARIABLE not in ('1')' as in the Alteryx workflow filter you would use !=.
🌐
SQLServerCentral
sqlservercentral.com › forums › topic › t-sql-code-review-where-field-does-not-contain
T-SQL Code Review - Where Field DOES NOT contain – SQLServerCentral Forums
December 5, 2022 - In some cases I would create a CTE, table variable or temp table of the valid values - then either JOIN or EXISTS or IN. In some cases I would create a list of exclusions (again, CTE, table variable or temp table) and use NOT EXISTS, NOT IN or OUTER JOIN.
🌐
TechOnTheNet
techonthenet.com › sql › not.php
SQL: NOT Condition
This is the recommended comparison operator to use in SQL when testing for non-NULL values. Let's look at an example that shows how to use the IS NOT NULL condition in a query. ... There will be 6 records selected. These are the results that you should see: This example will return all records ...
🌐
DataCamp
datacamp.com › tutorial › sql-not-in-operator
SQL NOT IN Operator: A Comprehensive Guide for Beginners | DataCamp
February 9, 2024 - Our decision to explore NOT IN in depth is to provide a comprehensive understanding that equips you with the knowledge to use it effectively in your SQL queries. The NOT IN operator is used within a WHERE clause to exclude rows where a specified column's value matches any in a given list of values.
🌐
SQL Team
sqlteam.com › forums › topic.asp
Full Text Search "NOT Contains " - SQL Server Forums
Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
🌐
Microsoft Learn
learn.microsoft.com › en-us › sql › t-sql › queries › contains-transact-sql
CONTAINS (Transact-SQL) - SQL Server | Microsoft Learn
Noise words (or stopwords) (such as a, and, or the) in full-text indexed columns are not stored in the full-text index. If a noise word is used in a single word search, SQL Server returns an error message indicating that the query contains only noise words.
🌐
W3Schools
w3schools.com › sql › sql_ref_not.asp
SQL NOT
SQL Examples SQL Editor SQL Quiz SQL Exercises SQL Server SQL Syllabus SQL Study Plan SQL Bootcamp SQL Certificate SQL Training ... The NOT command is used with WHERE to only include rows where a condition is not true.
Find elsewhere
🌐
W3Schools
w3schools.com › sql › sql_not.asp
SQL NOT Operator
SELECT * FROM Customers WHERE NOT CustomerId < 50; Try it Yourself » ... If you want to use W3Schools services as an educational institution, team or enterprise, send us an e-mail: [email protected] · If you want to report an error, or if you want to make a suggestion, send us an e-mail: [email protected] · HTML Tutorial CSS Tutorial JavaScript Tutorial How To Tutorial SQL Tutorial Python Tutorial W3.CSS Tutorial Bootstrap Tutorial PHP Tutorial Java Tutorial C++ Tutorial jQuery Tutorial
🌐
UniversalClass
universalclass.com › articles › computers › sql › using-the-in-not-and-like-operators-in-sql.htm
Using the IN, NOT, and LIKE Operators in SQL
Note that the % operator is for string or varchar values. The above examples use the percent character to return values that start with a specific string (in the above examples, the string was "da"). What if you need to find values that just contain a value? For instance, you could want to return all customers that just contain the string "ia." Again, we start off with the Customer database table. The following SQL ...
🌐
Microsoft
social.msdn.microsoft.com › Forums › sqlserver › en-US › 15814128-938b-4716-924a-f59f1aef8aca › where-does-not-contain
WHERE DOES NOT CONTAIN | Microsoft Learn
SELECT tblCase.CaseNum, tblCase.PrnByDate, tblCurrentReportStatus.ToxStatus FROM tblCase INNER JOIN tblCurrentReportStatus ON tblCase.CaseNum = tblCurrentReportStatus.CaseNum WHERE tblCurrentReportStatus.ToxStatus Not Like '%final%' And tblCurrentReportStatus.ToxStatus Not Like '%No Tox Requested%' AND tblCase.PrnByDate Between @StartDate AND DATEADD(d,1,@EndDate)
🌐
SAS Support Communities
communities.sas.com › t5 › SAS-Procedures › PROC-SQL-NOT-CONTAINS › td-p › 319627
PROC SQL NOT CONTAINS - SAS Support Communities
December 16, 2016 - I am using proc sql to pull the variable names and labels from a datafile I have and put them into macro vars (one each for varnames and labels). The issue is that I only want to pull in the varname+label pairs for those variables that do not have year values in the labels. This is what I've tried: ... It runs without any error messages, but it pulls in all variables even if the labels do have years in them. Any help is much appreciated! ... Contains will check for character string , however your goal is to check for numeric if its not present.
🌐
w3resource
w3resource.com › sql-exercises › sorting-and-filtering-hr › sql-sorting-and-filtering-hr-exercise-6.php
SQL: Employees first name does not contain the letter M
The said query in SQL that retrieves first name, last name (concatenated as "Full_Name"), hire date, salary, and department ID columns from the 'employees' table where the first name does not contain the letter 'M'. There is a clause called "NOT LIKE" that can be used to exclude rows that meet a particular condition in the table.
🌐
Database Guide
database.guide › find-values-that-dont-contain-numbers-in-sql
Find Values That Don’t Contain Numbers in SQL
The values are in fact matched, but we also negate the match by using NOT, which means that everything that does not match is returned. Another way to do it is to use the [:digit:] POSIX character class: SELECT ProductName FROM Products WHERE NOT REGEXP_LIKE(ProductName, '[[:digit:]]'); ... In SQLite, the REGEXP operator is a special syntax for the REGEXP() user function, so we can also do the following: SELECT ProductName FROM Products WHERE NOT REGEXP('[0-9]+', ProductName);
🌐
Educative
educative.io › answers › what-is-not-like-operator-in-sql
What is NOT LIKE operator in SQL?
The following is the basic syntax for using SQL’s NOT LIKE operator. SELECT column1, column2, ... ... SELECT column1, column2, ...: Specifies the columns to retrieve. FROM table_name: Indicates the table from which to retrieve data. WHERE column_name NOT LIKE pattern: Filters rows where the column_name does not match the pattern.
🌐
Intellipaat
intellipaat.com › home › blog › sql query where field does not contain $x
SQL Query Where Field DOES NOT Contain $x
April 27, 2025 - In SQL, if we want to filter the rows that do not contain the $x as a property, we can use the NOT LIKE operator.