2021
01-08
01-08
PostgreSQL 实现查询表字段信息SQL脚本
查询格式:SELECTc.relname表名称,A.attnameAS字段名称,col_description(A.attrelid,A.attnum)AS注释,format_type(A.atttypid,A.atttypmod)AS类型,CASEWHENA.attnotnull='f'THEN'否'ELSE'是'ENDAS是否必填,a.attnum序号FROMpg_classASc,pg_attributeASaWHEREA.attrelid=C.oidANDA.attnum>0ORDERBYc.relname,a.attnum;查询示例:SELECTc.relname表名称,A.attnameAS字段名称,spl...
继续阅读 >