Use of wildcard characters in SQL Server
Wildcard characters _
The "_" number represents any single character, and the symbol can match only one character. " _ "can be placed anywhere in the query condition and can only represent one character." A Chinese character is represented by only one "_".
Wildcard character%
The "%" symbol is a character match that can match a string of any length of 0 or more characters. In an SQL statement, you can place a% at any point in the query condition to represent a string of any length. You can also place two% queries when querying conditions, but it's best not to have two% in the query condition
wildcard characters []
"[]" can be used to query a certain range of data in a schema query. [] To specify any single character within a range, including both ends of the data
wildcard characters [^]
[^] is used to query any single character that does not belong to the specified range ([a-f]) or set ([abcdef]).
such as: SELECT * from Allcustomer
Where CustomerName like ' s[^abc]% '
Represents the query from the table Allcustomer that the user name begins with S, and the second character is not a,b,c information.
Use of wildcard characters in SQL Server