The % wildcard can also be used to search for any number of characters in a particular position. We can use the % wildcard to match any characters before or after the word paint as follows: SELECT * FROM product WHERE Name LIKE '%paint%' Īs we can see, five matching records have been found: We want to find all products with paint in their name. Let us assume that there is a product table that contains product information, including its name. In MySQL, the percentage symbol % is used as a wildcard character following the LIKE operator to match any string of zero or more characters. We will explain how to use different wildcards individually and in combination, provide examples of the NOT LIKE syntax and case-insensitive search, and also cover how to use the UPDATE and DELETE commands with the LIKE operator. Now that we are done with the basics, let us get down to business and look into some close-to-real-life examples of the LIKE operator usage.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |