Getting a list of Tables from SQL

J

J L

I have used the OleDb connection GetlOleDbSchema &
OleDbSchemGuid.Tables to get a list of tables from the Access
database. I can not find the equivalent way to get a list of tables
from an SQL database. Please advise how to go about this.

TIA,
John
 
M

Marc Scheuner [MVP ADSI]

database. I can not find the equivalent way to get a list of tables
from an SQL database. Please advise how to go about this.

Have a look at the INFORMATION_SCHEMA views in SQL Server.

SELECT * FROM INFORMATION_SCHEMA.TABLES

should give you a list of all available tables.

Marc

================================================================
Marc Scheuner May The Source Be With You!
Berne, Switzerland m.scheuner -at- inova.ch
 
J

J L

Thanks Marc. That is what I needed.

John

Have a look at the INFORMATION_SCHEMA views in SQL Server.

SELECT * FROM INFORMATION_SCHEMA.TABLES

should give you a list of all available tables.

Marc

================================================================
Marc Scheuner May The Source Be With You!
Berne, Switzerland m.scheuner -at- inova.ch
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top