Percent character (Wildcard - Character(s) to Match) (Transact-SQL)
2 minutes to read
In this article
THIS TOPIC APPLIES TO: SQL Server (starting with 2008) Azure SQL Database Azure SQL Data Warehouse Parallel Data Warehouse
Matches any string of zero or more characters. This wildcard character can be used as either a prefix or a suffix.
The following example returns all the first names of people in the
Person table of
AdventureWorks2012 that start with
-- Uses AdventureWorks
SELECT FirstName, LastName
WHERE FirstName LIKE 'Dan%';
LIKE (Transact-SQL) Operators (Transact-SQL) Expressions (Transact-SQL) [ ] (Wildcard - Character(s) to Match) [^] (Wildcard - Character(s) Not to Match) _ (Wildcard - Match One Character)
The feedback system for this content will be changing soon. Old comments will not be carried over. If content within a comment thread is important to you, please save a copy. For more information on the upcoming change,
we invite you to read our blog post.