8.2 计算两个日期之间的天数

select datediff(ward_hd,allen_hd)
from (
select hiredate as ward_hd
from emp
where ename='WARD'
) x,
(select hiredate as allen_hd
from emp
where ename='ALLEN'
)y;    

原文地址:https://www.cnblogs.com/liang545621/p/7523295.html