How to retrieve the names of all Nonsystem-databases from SQL Server 2000 using a TSQL query?
I have anticipated:
SELECT *
FROM sysdatabases
where dbid >4
order by dbid
it does not seem to be reliable.
Anything else?
How to retrieve the names of all Nonsystem-databases from SQL Server 2000 using a TSQL query?
I have anticipated:
SELECT *
FROM sysdatabases
where dbid >4
order by dbid
it does not seem to be reliable.
Anything else?
From SQL Server 2000 Books Online:
Each instance of SQL Server has four system databases (master, model, tempdb, and msdb) and one or more user databases.
So, master, model, msdb and temp are all the system databases. Your query can safely exclude just these.