Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

How to write a sql drop table stored procedure based on the table properties created date.

$
0
0

Hello All,

I would like to write a stored procedure to drop tables based on the created date in the table properties, and if a specific word is within the table name, for instance "backup". I would like to set to check and drop if more than 18 months old and to execute the stored procedure monthly. I would want this applied to all .dbo's. Any help would be much appreciated.


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>