|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
How to query the database list
Hi! is there's a statement that will return the list of database in MS SQL? Thanks.
|
|
#2
|
||||
|
||||
|
select * from master..sysdatabases
__________________
Up the Irons What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home. "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest Down with Sharon Osbourne Puzzle of the Month solved by Keath and KevinADC, superior perl programmers of the month |
|
#3
|
|||
|
|||
|
list of database in MS SQL
Quote:
In SQL server 2005, you can use SELECT * FROM SYS.DATABASES IN SQL SERVER 2000, YOU HAVE TO QUERY THE SYSOBJECTS TABLE. |
|
#4
|
|||
|
|||
|
In all versions you should be able to simply use the stored procedure sp_databases
http://msdn.microsoft.com/en-us/library/aa259636(SQL.80).aspx |
|
#5
|
|||
|
|||
|
How to list all the tables in a database?..
|
|
#6
|
|||
|
|||
|
Seems you are too lazy to have a look at the manual:
http://msdn.microsoft.com/en-us/library/aa259564(SQL.80).aspx |
![]() |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > How to query the database list |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|