PostgreSql フィールド情報取得

select
information_schema.columns.column_name as fieldname ,
information_schema.columns.data_type as fieldtype ,
information_schema.columns.character_maximum_length as length ,
information_schema.columns.is_nullable ,
information_schema.columns.column_default as defaultflg,
information_schema.columns.numeric_precision,
information_schema.columns.numeric_precision_radix,
information_schema.columns.numeric_scale,
(select description from pg_description where
pg_description.objoid=pg_stat_user_tables.relid and
pg_description.objsubid=information_schema.columns.ordinal_position
) as comment
from
pg_stat_user_tables,
information_schema.columns
where
pg_stat_user_tables.relname=’authority_mail’
and pg_stat_user_tables.relname=information_schema.columns.table_name
order by information_schema.columns.ordinal_position;

defaultflg
defaultvalue
comment

はいずこ

Comments are closed.

全自動マージャン卓
10万円未満で買える
折りたたんで収納


会社に1台

AMAZON