select datediff(ward_hd,allen_hd)*24 hr,
             datediff(ward_hd,allen_hd)*24*60 min,
             datediff(ward_hd,allen_hd)*24*60*60 sec
from (  
select max(case when ename='WARD'
then hiredate
end) as ward_hd,
max(case when ename='ALLEN'
then hiredate
end ) as allen_hd
from emp
) x;             

相关文章:

  • 2021-07-31
  • 2021-12-26
  • 2022-12-23
  • 2021-12-26
  • 2022-02-08
  • 2022-12-23
  • 2021-07-03
猜你喜欢
  • 2022-12-23
  • 2021-11-15
  • 2021-12-26
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案