Q: how to know the days or months or years between two employees in emp table?

A:
Let us say you want to find the days between the hiredates of two employees with employee no 99 and 345. in that case you can use the following query
select emp1.hiredate - emp2.hiredate
  from emp emp1, emp emp2
 where emp1.eno = 99
   and emp2.eno= 345

if you do not know the employee no but rather the name then

select emp1.hiredate - emp2.hiredate
  from emp emp1, emp emp2
 where emp1.ename = 'ram'
    and emp2.eno= 'shyam'