Monday, November 5, 2007

Run a Query to Show All Table

Mysql:
This allows you to see all existing tables inside the database selected.
mysql> SHOW TABLES;

Oracle:
Oracle doesn't support the above command, though an equivalent would be to use this sql statement:
sql > SELECT * FROM tab WHERE TABLE_TYPE = 'TABLE';
or
sql > SELECT * FROM cat WHERE TABLE_TYPE = 'TABLE';
or
sql > select * from user_objects where object_type = 'TABLE';

SQL Server:
Run the script below in your query analyzer.
SELECT * FROM INFORMATION_SCHEMA.TABLES where TABLE_TYPE = 'BASE TABLE'

1 comments:

Anonymous said...

Could not find a suitable section so I written here, how to become a moderator for your forum, that need for this?

 

Get paid for your opinions! Click on the banner above to join Planet Pulse. Its totally free to sign up, and you can earn UNLIMITED. Find out more by visiting PLANET PULSE.
Sign up for PayPal and start accepting credit card payments instantly. http://www.emailcashpro.com
July Code Blog Copyright © 2010 Blogger Template Designed by Bie Blogger Template