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
Nginx Rewrite usage scenarios 1. URL address jump...
Common points: The DIV tag and SPAN tag treat som...
This article shares a sharing sidebar implemented...
In normal development, we usually use convex roun...
When using VMware Workstation to open a virtual m...
Apache SkyWalking Apache SkyWalking is an applica...
(1) Server configuration: [root@localhost ~]# cd ...
Enctype : Specifies the type of encoding the brows...
Table of contents 1. Maven Dependency 2. Menu rel...
I encountered such a problem during development A...
Table of contents js deep copy Data storage metho...
Dynamically implement a simple secondary menu Whe...
Table of contents 1. Introduction: In this case, ...
I used Vue.js to make a nine-grid image display m...
The operating environment of this tutorial: Windo...