Hi,
What is the SQL command to show all table of a DataBase?
Thanks, in advance.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Jignesh TrivediPosted Jan 5, 2012, 2:40 AM
all above post is correct, I want add one more talbe from you get information about table, sp, system table ect..
select * from sys.all_objects where type_desc = 'USER_TABLE'
hope this help.
Vikrant JadhavPosted Dec 20, 2011, 1:59 AM
select * from SampleDB.sys.tables;
Above Query returns the all tables name from database named SampleDB.
Thanks & Regards
Vikrant Jadhav
Please mark as Correct answer if above post is helpful to you.
Prabhu RajaPosted Dec 20, 2011, 1:03 AM
Use YourDatabaseName
Go
Select * From sys.Tables
Go
Datta KharadPosted Dec 20, 2011, 12:45 AM
If you do not have access to DBA_TABLES, you can see all the tables that your account has access to through the ALL_TABLES view
SELECT owner, table_name
FROM all_tables
if you are only concerned with the tables that you own, not those that you have access to, you could use USER_TABLES
SELECT table_name
FROM user_tables
OR
SELECT * FROM tab;
For SQL Server
select * from information_schema.tables;