Wednesday, March 28, 2012

Return all databases names using query?

Hi, I am trying to get all the databases from MS SQL into a dropdownlist. However, I am not sure how to do that in query ... is there a way to retrieve all databases name using a query in MS SQL? Thanks.

Hi,

SQL Server has built-in proceduresp_databases to do that. You just need to have permissions to execute it.

No comments:

Post a Comment