From a stored procedure, how to get list of all databases starts with a
particular name, say "sample_" with a particular system (in network)
From a stored procedure, how to get list of all databases starts with a
particular name, say "sample_" with a particular system (in network)
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Amit ChoudharyPosted Mar 9, 2011, 7:37 AM
Here is your query:
SELECT name FROM sys.databases where name like 'sample_%'
Please don't forget to mark as answer.
Thanks.