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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Amit ChoudharyRank #145 · 15.8K reputationPosted Mar 9, 2011, 2:37 AM EST
Here is your query:
SELECT name FROM sys.databases where name like 'sample_%'
Please don't forget to mark as answer.
Thanks.