Find A Field In A Table

10-21-2004, 12:42 PM
Hi guys & gals!

Just wondering if anyone knows if there is a way to query an SQL database to find table information. I have a database with 100s of tables and I need to find a certian field in the database. Just not sure what table it is in...


10-21-2004, 02:57 PM
If you mean SQL Server database, then check out SQL Servers system stored procedures. If it's Oracle, you need to look at the data dictionary objects.

For instance, sp_help can return a recordset that contains all the system objects. Just filter the recordset for Object_type = 'user table' to get a list of all tables.

Then, issue an sp_columns 'TableName' for each user table to get a list of all columns in each of the tables.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum