I have created a list of databases I want to drop based on a set of conditions and have titled it delete_table in the master database (this already excludes master, tempdb, model and msdb). The only column in this table is name which contain the exact database names that should be deleted.
How would I go about writing the script that would drop the databases on the server based on this list?
Thanks!
quick way
a bit safer way to make sure database exists and each database get scripted only once incase you have dups
Edit to add alter database simply add this line