--【导例4.10】如何计算某日期的过几天(几月、几年)、前几天(几月、几年)的日期？
--如何计算年龄(月龄、天龄)？

select dateadd(year,2, '2004-4-6') as '过2年'
select dateadd(month,-1, '2004-4-6') as '前1月'
select dateadd(day,3, getdate()) as '大后天'
select datediff(day, '2004-4-4',getdate()) as '天龄'
select datediff(month, '2004-3-2', '2004-4-6') as '月龄'
select datediff(year, '2001-3-3', '2004-4-6') as '年龄'
