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

How to execute the output of the below query automatically

$
0
0

Hi All,

I want to execute the output of the below query automatically, instead of manually copying it and execute.

select 'alter database ['+name+'] set recovery simple' from master.sys.databases where database_id > 4 and state_desc = 'online'

Please provide me a script to do this.

ThanK

Kate


Viewing all articles
Browse latest Browse all 23857

Trending Articles



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