ajliaks


Hi guys,

If I have an SQL connection called

"SERVER"

and into SERVER I have five different Databases like

"DB1"

"DB2"

"DB3"

"DB4"

"DB5"

(each one with it's own Tables / Views / Functions / etc)

How can I get the DATABESES LIST

Thanks in advance,

Aldo.





Re: TSQL - Retrieving my Databes index (list)

Rob Farley


Try:

select * from sys.databases --SQL2005
select * from sysdatabases --SQL2000

Rob






Re: TSQL - Retrieving my Databes index (list)

Manivannan.D.Sekaran

Here you go..

Code Snippet

select * from sys.databases

select * from master..sysdatabases







Re: TSQL - Retrieving my Databes index (list)

ajliaks

Thanks you guys!