sql语句中,取得schema中的所有表信息及表的定义结构

postgressql下
'検索スキーマの中で、全てテーブル
select tablename from pg_tables where schemaname='test'

mysql下
'検索スキーマの中で、全てテーブル
select table_name from information_schema.tables where table_schema='csdb'

 

 postgressql,mysql都可以
'テーブルの定義情報
select * from information_schema.columns where TABLE_SCHEMA='test';

posted @ 2018-08-02 09:38  不刷牙的大虫子  阅读(1402)  评论(0)    收藏  举报