sql list all table and schema names SELECT * FROM INFORMATION_SCHEMA.TABLES order by TABLE_TYPE, TABLE_SCHEMA