Get Object Updated or Created in last N Days - Sql Server

Jul 22, 2019 BY xtreme
Store Procedure / Tables Updated in Last 30 Days

    select dateadd(day, -30, getdate()) ,* 
    from sys.objects 
    where (type = 'P' ) 
    and modify_date > dateadd(day, -30, getdate()) 
    and name like '%Table_Name%'
    order by modify_date desc

    NOTE- Use U for User Defined Table, V for Views, TR/TA for Triggers, P for sprocs 
	 
Store Procedure / Tables Created in Last 30 Days

    select dateadd(day, -30, getdate()) ,* 
    from sys.objects 
    where (type = 'P' ) 
    and create_date > dateadd(day, -30, getdate()) 
    and name like '%Table_Name%'
    order by create_date desc

    NOTE- Use U for User Defined Table, V for Views, TR/TA for Triggers, P for sprocs
	

Related