标签:sel ediff rom nbsp date ase when ted 日期
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;
标签:sel ediff rom nbsp date ase when ted 日期
原文地址:http://www.cnblogs.com/liang545621/p/7523308.html