Search for the & character in SQL SERVER using a similar operator and wildcard

I need to find '&' in the string.

SELECT * FROM TABLE WHERE FIELD LIKE ..&...

What we tried:

SELECT * FROM TABLE WHERE FIELD LIKE '&&&'
SELECT * FROM TABLE WHERE FIELD LIKE '&\&&'
SELECT * FROM TABLE WHERE FIELD LIKE '&|&&' escape '|'
SELECT * FROM TABLE WHERE FIELD LIKE '&[&]&'

None of them give any results SQLServer. Well, some give all the lines, some don't.

Similar questions that did not work or were not specific enough.

Find% symbol in LIKE query

How to determine if a string contains special characters?

some old Server 2000 link

http://sqlserver2000.databases.aspfaq.com/how-do-i-search-for-special-characters-eg-in-sql-server.html

+4
source share
2 answers

& SQL, .

% , .

SELECT * FROM TABLE WHERE FIELD LIKE '%&%'
+10

, WHERE FIELD = '&'.

& SQL, .

WHERE FIELD LIKE '%&%'

, & -

, , - . WHERE FIELD LIKE '&%', , , &.

, SQL Server FTS , CONTAINS FREETEXT

+4

All Articles