SQL - Structured Query Language | |||||||||||||||
LIKE (Wild Card) OperatorLIKE operator is used to find out collection of records from group of records based on specific character string matches a specified pattern. A pattern can include regular characters and wildcard characters. During pattern matching, regular characters must exactly match the characters specified in the character string. However, wildcard characters can be matched with arbitrary fragments of the character string. List of Wildcard Character
If it is possible, implicitly SQL Server converts character data type, while the arguments column data types are not string data type. The following queries are used to find out collection of records from PRODUCT table based on particular string pattern data values. -- Example 49 --
SELECT * FROM Product WHERE Prod_Tax LIKE 15
SELECT * FROM Product WHERE Prod_Name LIKE 'Product A'
SELECT * FROM Product WHERE Prod_Name LIKE 'Product%'
SELECT * FROM Product WHERE Prod_Name LIKE 'Product _' Query Output Screen |
* * * * *