Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Listing of table details

Status
Not open for further replies.

bastienk

Programmer
Mar 3, 2004
326
0
0
CA
Hi All,

Is there an sp I can query to display / return the schema of an db?


Bastien

Cat, the other other white meat
 
Right click on a table in EM and there is a choice for scripting any/all objects.
-Karl
 
Thanks, the catch is I need to run this thru ADO...


Bastien

Cat, the other other white meat
 
sp_help <tablename>

But this returns an Array of recordsets, so you need to
retrieve one you need using something like this

Dim Array() As Object
Dim myRs AS ADODB.Recordset

Array() = call_your_sproc_here(<tableName>)
Set myRs = Array(1)

Hope this helps
 
select * from INFORMATION_SCHEMA.TABLES -Lists Tables in a DB
select * from INFORMATION_SCHEMA.TABLES - Lests the Columns and the appropriate Table

select * from INFORMATION_SCHEMA.VIEWS - Lists your Views

Look up INFORMATION_SCHEMA in BOL for a complete list.

&quot;Shoot Me! Shoot Me NOW!!!&quot;
- Daffy Duck
 
MDXer,

Yours is the same solution I found as well...that is what I will use

Thanks All


Bastien

Cat, the other other white meat
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top