Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Database Table Names

by bilfurd (Hermit)
on Nov 07, 2003 at 22:10 UTC ( [id://305468]=note: print w/replies, xml ) Need Help??


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!!!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://305468]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-04-25 13:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found