雑多

Oracle, MySQL, PostgreSQL, SQL Server,H2 それぞれでテーブル一覧を取得する SQL

度々調べるので自分用にメモ。

Oracle
select * from all_objects where object_type='TABLE';

MySQL
show tables;

PostgreSQL
select * from pg_tables where not tablename like 'pg%' order by tablename;

SQL Server
select name from sysobjects where xtype = 'U';

H2
select * from INFORMATION_SCHEMA.tables;