Hey can anyone give me the query to retrieve a list of databases on a server rather than this query

SELECT NAME FROM sysobjects

which gives me a list of tables ????

Thank you

Oh cool this seems to work

SELECT name 
FROM master.dbo.sysdatabases 
WHERE name NOT IN ('master','model','msdb','tempdb')
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.