mysql - 查询数据库的表字段
1.
-- mysql select GROUP_CONCAT(column_name) from information_schema.columns where table_schema='数据库名' and TABLE_NAME = '表名'
GROUP BY table_name; -- pg SELECT array_to_string(array_agg(a.attname),',') FROM pg_class as c,pg_attribute as a where c.relname = 'stock_quant' and a.attrelid = c.oid and a.attnum>0