Joining a table to itself is called as self join. Let's see an example- to find the name of each employee's manager. Here we need to join the emp table to itself. For example to find out the manager of a particular employee what you have to do is:
Find out the employee in the emp table by looking the emp-name column.
Get the manager id of that employee by looking at the manager-id column. Let's say the id of the manager is 101. Find out the name of the employee whose employee id is 101.
To see all the employee along with there manager for whom they work the statement is:
In the above example , the where clause specifies a condition that is where a manager id of worker table matches the employee id of the manager table .
In the above example the emp table joins to itself. To simulate two table in the from clause there are two aliases, namely worker and manager for the same table emp.