Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/postgresql/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sql 如何向表中添加说明_Sql_Postgresql - Fatal编程技术网

Sql 如何向表中添加说明

Sql 如何向表中添加说明,sql,postgresql,Sql,Postgresql,我知道\d+列出了表格及其说明,例如: List of relations Schema | Name | Type | Owner | Size | Description --------+-----------------+-------+---------+------------+------------- public | table1 | table | me

我知道\d+列出了表格及其说明,例如:

                           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';
手册中有更多详细信息: