Compatiblity:-SQL server 7.0
sp_MSForEachDB is an undocumented stored procedure using which we can execute a single piece of code against all the databases as a server...
EXEC sp_MSForEachDB 'SELECT ''?'' AS DBName, * FROM [?]..sysusers'
Get your codes from..
Saturday, May 10, 2008
Execute a single piece of code against all the dbs at a server
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment