in reply to Database Table Names

DBI & ODBC are very handy when dealing with SQL Server (I use it whenever possible), but in the spirit of TMTOWTDI --

In the database, there is a table called sysobjects that stores information about all the objects in that database. Each object type (key, table, index, etc.) has a specific code. These codes are stored in the xtype field. So...

SELECT name FROM sysobjects WHERE xtype='U' ORDER BY name

... should return a list of all table names in the database.

Cheers

Replies are listed 'Best First'.
Re: Re: Database Table Names
by Anonymous Monk on Nov 08, 2003 at 01:20 UTC
    I know how to access any table in a given database but what I am looking for is to get all the names of the tables inside of the data base and then from my selection my program will read the objects from that table but first a need to find if in a database called xyz with a bunch of tables I could list all the tables in it, and then I will read the contents of he choosen table from the database. Thank you all!!!