Sql 如何向表中添加说明
我知道\d+列出了表格及其说明,例如:Sql 如何向表中添加说明,sql,postgresql,Sql,Postgresql,我知道\d+列出了表格及其说明,例如: List of relations Schema | Name | Type | Owner | Size | Description --------+-----------------+-------+---------+------------+------------- public | table1 | table | me
List of relations
Schema | Name | Type | Owner | Size | Description
--------+-----------------+-------+---------+------------+-------------
public | table1 | table | me | 123 kB |
public | table2 | table | me | 123 kB |
public | table3 | view | me | 123 kB |
public | table4 | table | me | 123 kB | some description
public | table5 | table | me | 123 kB |
public | table6 | table | me | 123 kB | another description
(6 rows)
我想知道如果一个描述不存在,如何修改或写一个
comment on table table1 is 'This is a new description';
comment on table table4 is 'This is a changed description';
手册中有更多详细信息: