DECLARE @beginDate DATETIME DECLARE @endDate DATETIME SET @beginDate='2009-6-10' --时间开始 SET @endDate=GETDATE() --结束时间 SELECT '动作'=(CASE WHEN create_date>=@beginDate THEN 'create 'ELSE 'alter ' END), '类型'=(case [type] when 'p' then '存储过程' when 'u' then '表' when 'v' then '视图' else '' end), '对象名称'=[name], '修改时间'=modify_date, '创建时间'=create_date FROM sys.all_objects WHERE [type]='p' OR [type]='u' OR [type]='v' and modify_date between @beginDate AND @endDate ORDER BY modify_date DESC