我知道我可以用
describe table a_table
来描述 Snowflake 中表格中的列。但是,我想限制返回到 name
和 comment
的列,以仅使用此信息创建该表的密码本。我怎样才能实现这个目标?
您可以使用
information_schema
代替描述
select column_name,comment from information_schema.columns
where concat_ws('.'table_catalog,table_schema, table_name) = "db.schema.tablename"