SQL Aliases

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

select * from employeedep;

name id department
Komal I010 Dev
Akshaya I016 Dev
Ramesh I026 Quality
Hardik I038 Ops
Kaushik I046 Quality
Glory I058 Ops

SQL Aliases:

select d.id, i.name, i.age, d.department from employeeinfo AS i, employeedep AS d where i.name=’Komal’ AND d.id=’I010′;

id name age department
I010 Komal 25 Dev

Leave a Reply

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