select string_agg((column_name||’ as “‘||upper(column_name)||’”’), ‘,’)
from information_schema.columns
where table_schema=‘publicand table_name=lower(‘tableName’)

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注