What is the Wildcard Operator in MySql

SQL wildcards can substitute for one or more characters when searching for data in a database. SQL wildcards must be used with the SQL LIKE operator.

Sintax :

Select (column name) from table_name
    where (column name) like '%values%';
Let's create the table we will use for our examples:

Script:

--first lets drop the table Test (if she exists, if not skip the drop line).
Drop table test;
create table test (id int,name varchar(20),email varchar(20),salary int ,de char(20));
--insert values into table
insert into test values (1,'Eve','[email protected]',1500,'HR');
insert into test values (2,'Jon','[email protected]',2500,'AD');
insert into test values (3,'Mike','[email protected]',3000,'AD');
insert into test values (4,'Paul','[email protected]',3200,'HR');
insert into test values (5,'Mary','[email protected]',1800,'IT');
insert into test values (6,'Jane','[email protected]',2200,'IT');
Check the table to see the data and the structure.
SQLselect * from test ;
    ID NAME         EMAIL            SALARY  DE
 ---------- -------------------- -------------------- ---------- --  --------
     1  Eve         [email protected]       1500   HR
     2  Jon         [email protected]       2500   AD
     3  Mike       [email protected]        3000   AD
     4  Paul        [email protected]       3200   HR
     5  Mary       [email protected]        1800   IT
     6  Jane        [email protected]       2200   IT
Very good

Example:

-we will use the wildcard operator in front.
SQLselect name from test where name like '%ve';
NAME
--------------------
Eve
-we see that the query brings all the names that have the string 've' at the end of the word.

Example:

-we will use the wildcard operator at the end.
SQLselect name from test where name like 'Mi%';
NAME
--------------------
Mike
-we see that the query brings all the names that have the string 'MI' at the Front of the word.

Example :

-we will use the wildcard operator at the front and end.
SQLselect name from test where name like '%k%';
NAME
--------------------
Mike
-we see that the query brings all the names that have the string 'k' inside the word.