Solved

sql query to get list of all tables

Posted on 2002-04-12
8
1,559 Views
Last Modified: 2007-12-19
Any one know how to list all tables in a db using SQL
0
Comment
Question by:bearware
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 4

Expert Comment

by:mrorph
ID: 6937303
Try:
Select TABLE_NAME,TABLE_TYPE from INFORMATION_SCHEMA.TABLES
0
 
LVL 3

Expert Comment

by:arun04
ID: 6938477
which RDBMS are you taking about, this information is present in different data dictionary tables in various RDBMS

for oracle

select * from tab where tabtype = 'TABLE' ;


for sql server and sybase

select name from sysobjects where type = 'U'

0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 6941439
if you use ADO, you can use:

dim c as new ADODB.Connection
dim t as adodb.recordset
c.open "yourdatabaseparams"
set t = c.OpenSchema (adSchemaTables)

CHeers
0
Percona Live Europe 2017 | Sep 25 - 27, 2017

The Percona Live Open Source Database Conference Europe 2017 is the premier event for the diverse and active European open source database community, as well as businesses that develop and use open source database software.

 
LVL 4

Expert Comment

by:mrorph
ID: 6941778
arun04:

I tested the statement on SQL server and I believe that it is ANSI 92 SQL and not RDBMS-specific.  I am not sure though.
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 6946629
bearware, have you been helped here?  Is this the question you asked me about in the Community Support question?

Experts, is there anything further you can add here to help bearware?

Thanks,
Moondancer - EE Moderator
0
 
LVL 1

Author Comment

by:bearware
ID: 7014106
It seems there is no portable way to do this with SQL.
I friend says that ODBC,JDBS, and UDBC provide a portable way.
0
 
LVL 54

Expert Comment

by:nico5038
ID: 7265666

No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
 - PAQ'd and pts removed
Please leave any comments here within the
next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

Nic;o)
0
 
LVL 5

Accepted Solution

by:
Netminder earned 0 total points
ID: 7296563
Per recommendation, points NOT refunded and question closed.

Netminder
CS Moderator
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

These days, all we hear about hacktivists took down so and so websites and retrieved thousands of user’s data. One of the techniques to get unauthorized access to database is by performing SQL injection. This article is quite lengthy which gives bas…
In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller singl…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…

622 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question