tb_car表中DDL语句中有COMMENT
COMMENT ON COLUMN public.tb_car.car_id IS '主键'; COMMENT ON COLUMN public.tb_car.car_index_code IS '车辆编码'; COMMENT ON COLUMN public.tb_car.plate_no IS '车牌号码';
用如下语句查询
SELECT col.table_name, col.column_name, col.ordinal_position AS o, d.description FROM information_schema.columns col JOIN pg_class c ON c.relname = col.table_name LEFT JOIN pg_description d ON d.objoid = c.oid AND d.objsubid = col.ordinal_position WHERE col.table_schema = 'public' and col.table_name = 'tb_car'
标签:COMMENT,语句,postgresql,car,public,table,tb,col From: https://www.cnblogs.com/bigleft/p/18127119