Your where clause will return all rows where tester does not match username AND where tester is not null.

If you want to include NULLs, try:

Copywhere tester <> 'username' or tester is null

If you are looking for strings that do not contain the word "username" as a substring, then like can be used:

Copywhere tester not like '%username%'
Answer from Gordon Linoff on Stack Overflow
🌐
GeeksforGeeks
geeksforgeeks.org › sql › sql-not-equal-operator
SQL NOT EQUAL Operator - GeeksforGeeks
April 18, 2026 - The SQL NOT EQUAL operator compares two values and returns true if they are not equal. It’s used to filter out matching records in queries. If the values are equal, it returns false; if either value is NULL, it returns NULL.
🌐
Hightouch
hightouch.com › sql-dictionary › sql-not-equal-to
SQL Not Equal To - Syntax, Use Cases, and Examples | Hightouch
January 3, 2024 - The SQL "Not Equals To" operator, denoted as "<>", "!=", or "NOT =", is used to compare values in a database table and retrieve rows where a specific column's value does not match a given criteria.
🌐
TutorialsPoint
tutorialspoint.com › mysql › mysql-not-equal.htm
MySQL - NOT EQUAL Operator
In MySQL, we can also use the NOT EQUAL to compare two string values. It returns true if both values are not equal. We can use "<>" or "!=" in the WHERE clause of a SQL statement and exclude rows that match a specific value.
🌐
DataCamp
datacamp.com › tutorial › sql-not-equal
SQL NOT EQUAL Operator: A Beginner's Guide | DataCamp
December 10, 2024 - It can be used in the WHERE clause to specify rows to be updated based on non-equality. UPDATE employees SET salary = salary * 1.1 WHERE job_id != 'Manager'; It can be used in the WHERE clause to identify rows to delete where the condition is true. ... Let's delve deeper into the practical application of the SQL NOT EQUAL operator with expanded examples that demonstrate its versatility and power in querying databases.
🌐
Microsoft Learn
learn.microsoft.com › en-us › sql › t-sql › language-elements › not-equal-to-transact-sql-traditional
&lt;&gt; (Not Equal To) (Transact-SQL) - SQL Server | Microsoft Learn
May 8, 2026 - Applies to: SQL Server Azure SQL ... Fabric · Compares two expressions (a comparison operator). When you compare non-null expressions, the result is TRUE if the left operand isn't equal to the right operand....
🌐
Tutorialspoint
tutorialspoint.com › sql › sql-not-equal.htm
SQL - NOT EQUAL Operator
The SQL NOT EQUAL operator is used to compare two values and return TRUE if they are not the same. It is represented by " " and "!=". The difference between these two is that follows the ISO standard, but != doesn't.
Find elsewhere
🌐
Mimo
mimo.org › glossary › sql › not-equal
SQL Not Equal: Syntax, Usage, and Examples
The not equal operator isn’t just for comparing a column to a fixed value. You can use it between two columns as well: ... This query returns orders where the billing and shipping addresses are different. Use SQL not equal with AND, OR, or IN for more complex filters:
🌐
Microsoft Learn
learn.microsoft.com › en-us › sql › t-sql › language-elements › not-equal-to-transact-sql-exclamation
!= (Not Equal To) (Transact-SQL) - SQL Server | Microsoft Learn
May 8, 2026 - Applies to: SQL Server Azure SQL ... in Microsoft Fabric SQL database in Microsoft Fabric · Tests whether one expression isn't equal to another expression (a comparison operator)....
🌐
SQL Shack
sqlshack.com › sql-not-equal-operator
SQL Not Equal Operator introduction and examples
May 21, 2021 - We can use both SQL Not Equal operators <> and != to do inequality test between two expressions. Both operators give the same output. The only difference is that ‘<>’ is in line with the ISO standard while ‘!=’ does not follow ISO standard.
🌐
MSSQLTips
mssqltips.com › home › sql not equal examples
SQL NOT EQUAL Examples
December 31, 2024 - The following example shows an IF that compares a string data type variable to a hard coded string value. --Ignore test user IF @UserLogin <> 'TestUser' BEGIN END · The not equal operators can be used with a numeric data type including int, bigint, smallint, tinyint, numeric, decimal, float, real, and money).
🌐
JanbaskTraining
janbasktraining.com › home › a complete overview of sql not equal operator with examples
A Complete Overview Of SQL Not Equal Operator with Examples| JanBask Training
October 19, 2024 - The query SQL Not Equal Operator (<>) shows the comparison of gender column value with string value ‘Female’ to retrieve male patient data
🌐
Alma Better
almabetter.com › bytes › tutorials › sql › equal-and-not-equal-to-in-sql
Equal and Not Equal to in SQL
August 10, 2023 - Utilize the not equal operator (“<>”) in an SQL statement to return records that are not equal to the required value. The “<>” operator checks for inequality between two values.
🌐
DailyRazor
dailyrazor.com › home › blog › mysql not equal operator simplified with practical examples
MySQL Not Equal Operator Simplified With Practical Examples
September 7, 2021 - If you’re wondering what is NOT EQUAL in MySQL, we’ve hinted in the above introduction that the inequality operator in MySQL is to used to check that the rows that are returned by a SQL query do not match a certain value.
🌐
Scaler
scaler.com › home › topics › sql › not equal in sql
Not Equal in SQL - Scaler Topics
May 19, 2022 - The part of SQL query which contains the not equal operator is shown below, ... The expression1 and expression2 could be any number, text, constant value, or column value accessed through the select statement. The default strings comparison in SQL is case insensitive which means the statement 'ABC' <> 'abc' will evaluate to false.
🌐
Valuedrivenanalytics
valuedrivenanalytics.com › home › where not equal in sql
WHERE Not EQUAL in SQL - Value Driven Analytics
January 26, 2024 - Yes, WHERE NOT EQUAL can be used with text strings. It can compare non-numeric data types such as text and compare them to a given value. What is the difference between WHERE NOT EQUAL and WHERE NOT IN?
🌐
Intellipaat
intellipaat.com › home › blog › not equal to in sql
SQL Not Equal Operator: Usage, Examples & Differences
July 20, 2025 - It is represented by the symbols <> or !=. ... To remove duplicates in SQL, you can use the DISTINCT keyword in your SELECT statement. ... In MS SQL, NULL is a special marker used to indicate that a data value does not exist in the database.