Show SQL Tables

When working with a database sometimes you will want to look up all the available database tables. To show the available tables in SQL Server you can do the following:

select * from information_schema.tables;

In Oracle you can use any of the following statements:

select * from user_tables;
select * from all_tables;

In MySQL I have been using the following since MySQL 3:

show tables;

But in MySQL 5 you can use the following:

select * from information_schema.tables;

Technorati Tags: , , , ,

Related posts:

  1. Desc SQL Tables
  2. Query Managed Auto Increment
  3. MySQL Admin
  4. Create SQL Server Database and Database Tables From a File
  5. Copy Data Between Two Database Tables

This entry was posted in SQL, TechKnow. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

2 Comments

  1. Posted July 31, 2008 at 1:51 am | Permalink

    Just trying Oracle’s “iSQL Plus” for the first time at university – now I know what tables I can query :)

    Cheers :)

  2. ANJAN GHOSH
    Posted August 5, 2009 at 10:12 pm | Permalink

    EXEC SP_TABLES( RUN THIS QUERY , THE CURRENT DATABASE, AND SHOW ALL TABLES)

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*