SQL Wildcard Characters

SHOW Table:

select * from employeeinfo;

name age address salary
Komal 25 Mumbai 25000
Ramesh 35 Delhi 25000
Kaushik 31 Indore 25000
Hardik 22 Hyderabad 25000
Glory 28 Kanpur 25000
Akshaya 29 Delhi 25000

SQL Wildcards:

select * from employeeinfo where address LIKE ‘hyd%’;

name age address salary
Hardik 22 Hyderabad 25000

select * from employeeinfo where name LIKE ‘%mesh%’;

name age address salary
Ramesh 35 Delhi 25000

select * from employeeinfo where name LIKE ‘_omal’;

name age address salary
Komal 25 Mumbai 25000

select * from employeeinfo where name LIKE ‘K_m_l’;

name age address salary
Komal 25 Mumbai 25000

Leave a Reply

Your email address will not be published. Required fields are marked *