First, let's briefly introduce wildcards, special characters used to match part of a value. Wildcards are a supplement to operators. Operators are confirmed, while wildcards are fuzzy. Here are a few examples: % Wildcard: SELECT * FROM products WHERE products.prod_name LIKE 'jet%' This % means that any preceding character appears any number of times. This example uses the search Case Sensitivity Depending on how Let's look at another example account: SELECT * FROM products WHERE products.prod_name LIKE '%anvil%' The above means that any Again, here is another example: SELECT * FROM products WHERE products.prod_name LIKE 's%e' This means that all It is important to note that Note Trailing spaces Trailing spaces may interfere with wildcard matching. For example, in the save word
Another useful wildcard character is the underscore SELECT * FROM products WHERE products.prod_name LIKE '_ ton anvil' The Unlike As you can see, Don't overuse wildcards. If other operators can achieve the same purpose, you should use other operators. When you do need to use wildcards, don't use them at the beginning of a search pattern unless absolutely necessary. Placing the wildcard at the beginning of the search pattern is the slowest search. This is the end of this article about MySQL wildcards (SQL advanced filtering). For more relevant MySQL wildcard content, please search 123WORDPRESS.COM's previous articles or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Eight hook functions in the Vue life cycle camera
>>: canvas.toDataURL image/png error handling method recommendation
Reproduce on Kali First set suid permissions for ...
1. Install the express library and generator Open...
In the past, float was often used for layout, but...
Recently, I want to build a hadoop test cluster i...
Before understanding this problem, let's firs...
Table of contents 1. Block scope 1.1. let replace...
This article shares the installation and configur...
Forms are a major external form for implementing ...
Table of contents Virtual DOM What is virtual dom...
Table of contents Preface Laying the foundation p...
1. Overall architecture diagram Compared to other...
1. Use of CSS scope (style division) In Vue, make...
1. Overview of SQLException When an error occurs ...
What is the purpose of creating your own website u...
This article example shares the specific code of ...