LIKE operator is used for pattern matching, and it can be used as -.
% – Matches zero or more characters.
_(Underscore) – Matching exactly one character.
Example -.
MySQL
Select * from Student where studentname like ‘a%’
1
Select * from Student where studentname like ‘a%’
Select * from Student where studentname like ‘ami_’
1
Select * from Student where studentname like ‘ami_’
% – Matches zero or more characters.
_(Underscore) – Matching exactly one character.
Example -.
MySQL
Select * from Student where studentname like ‘a%’
1
Select * from Student where studentname like ‘a%’
Select * from Student where studentname like ‘ami_’
1
Select * from Student where studentname like ‘ami_’