Friday, July 23, 2010

list all tables in a database

So I'm documenting a database with 21 tables in it. I wanted A quick way to get them listed. Voila:

SELECT *
FROM information_schema.Tables where table_type = 'base table'



note that I added the WHERE clause. Without it, I also got all of the views.

No comments: