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: sql server, oracle, mysql, database, sql
Related posts:
2 Comments
Just trying Oracle’s “iSQL Plus” for the first time at university – now I know what tables I can query :)
Cheers :)
EXEC SP_TABLES( RUN THIS QUERY , THE CURRENT DATABASE, AND SHOW ALL TABLES)