0

Hi
I have created many tables in database. Now when i used to create new table that's name may already exists. So, before creating new table i must know which table names are already exists in my database.
And for that i want to display all the tables created in database. As we can dispaly all the columns of a table by using select * from table_name So. please tell me such a query by which i can display list of all tables exists in my database.

4
Contributors
3
Replies
11
Views
8 Years
Discussion Span
Last Post by mangal4mTerna
0

Hi Dipti,

You can use the below querry to get the table names in your DB:

select * from tab;
-1

hi,

use below query to get all table names in database

SELECT TABLE_SCHEMA + '.' + TABLE_NAME, *
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_TYPE = 'BASE TABLE'
ORDER BY TABLE_SCHEMA + '.' + TABLE_NAME

Votes + Comments
please do not post if you do not know the answer.
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.