Hi.
What does this query return?
select * from sysdatabases where sid <> 0x01 order by name
Loading
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
Scott LysleRank #49 · 31K reputationPosted Nov 10, 2011, 7:18 PM EST
Nethra R SRank #6,347 · 269 reputationPosted Nov 10, 2011, 7:19 PM EST
Does it give all the database names?
Arjun PanwarRank #254 · 9.9K reputationPosted Nov 10, 2011, 7:21 PM EST
this query is used To get the database names.
Nethra R SRank #6,347 · 269 reputationPosted Nov 10, 2011, 7:24 PM EST
Suppose i have some 50 databases.. Will it return all the database names? Why is it used and where? In what situations?
AartiRank #2,383 · 594 reputationPosted Nov 14, 2011, 9:52 PM EST
This gives all non system databases informations like name,Filename,version ,status... etc.
Thanks.
Kunal Naik163 reputationPosted Nov 14, 2011, 10:44 PM EST
Yes it will return all the database names as well as other information of the database like dbid, sid, filename, version etc.
It is used to getting information of all those databases which are created in sql server except system databases.