Is there a way of dropping tables automatically weekly or monthly dependent on modify date? After some research on this site I found a script and modified it to the below.
select
'drop table Update_Backups.[' + s.name +'].[' + t.name +']' , t.modify_date
from
Update_Backups.sys.tables t
inner join
Update_Backups.sys.schemas s
on
s.schema_id = t.schema_id
where
modify_date < DATEADD(year,-01, GETDATE())
Unfortunately it still has a manual element as I have to copy the the results and run them. I would like this to be totally automatic but my skills don't reach that far.