Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I loop through databases in SQL Server?
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01038181
Message ID:
01038185
Views:
17
>Is there a way to programmatically loop through the databases in SQL Server?
>
>something like the following pseudo-code?
>
>nDatabases = sqlServer.NumberOfDatabases
>
>for i = 1 to nDatabases
>   insert into sqlServer.ArrayOfDatabases[i].TableName , yada, yada...
>endfor
>
You can use INFORMATION_SCHEMA view to get list of databases
SELECT * FROM INFORMATION_SCHEMA.SCHEMATA
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform