Goto main content

help desk

Why does using an Underscore character in a LIKE filter give me all the results?

n the LIKE I want to search for any underscores %_%, but I know that my columns' data has no underscore characters.

Why does the query give me all the records from the table?

Asked on 2020-02-11 00:00:00


Modify your WHERE condition like this:

WHERE mycolumn LIKE '%\_%'

The '_' and '%' are wildcards in a LIKE operated statement in SQL.

Answer by:
Etienne Carrier

Replied on: 2020-02-11 00:00:00