1 Answer

0 votes
by

SQL Wildcard Characters

A wildcard character is used to substitute one or more characters in a string.

Wildcard characters are used with the SQL LIKE operator. The LIKE operator is used in a WHERE clause to search for a specified pattern in a column.

Wildcard Characters in MS Access

SymbolDescriptionExample
*Represents zero or more charactersbl* finds bl, black, blue, and blob
?Represents a single characterh?t finds hot, hat, and hit
[]Represents any single character within the bracketsh[oa]t finds hot and hat, but not hit
!Represents any character not in the bracketsh[!oa]t finds hit, but not hot and hat
-Represents a range of charactersc[a-b]t finds cat and cbt
#Represents any single numeric character2#5 finds 205, 215, 225, 235, 245, 255, 265, 275, 285, and 295

Wildcard Characters in SQL Server

SymbolDescriptionExample
%Represents zero or more charactersbl% finds bl, black, blue, and blob
_Represents a single characterh_t finds hot, hat, and hit
[]Represents any single character within the bracketsh[oa]t finds hot and hat, but not hit
^Represents any character not in the bracketsh[^oa]t finds hit, but not hot and hat
-Represents a range of charactersc[a-b]t finds cat and cbt

Related questions

0 votes
asked Sep 9, 2019 in Spark Sql by ivor2019
0 votes
asked Sep 9, 2019 in Spark Sql by ivor2019
...