一. 字段
1. 添加
alter table book add column book_id varchar not null, book_title varchar(10) default '';
2. 删除
alter table book drop book_id, book_title;alter table book drop book_id, book_title cascade;
3. 修改类型
alter table book alter column book_title type varchar;
4. 重命名
alter table book rename column book_title to book_name;
二、主键
1. 添加
alter table book add primary key(book_id);
2. 删除
alter table book drop constraint book_id;
三、约束
1. 增加
alter table book add conversion book_id_unique unique(book_id);alter table book alter column book_title set not null;
2. 删除
alter table book drop constraint book_id_unique;alter table book alter column book_title drop constraint not null;
四、默认值
1. 添加和修改
alter table book alter column book_title set default '无';
3. 删除
alter table book alter column book_title dorp default;
无、注释
1. 表
comment on table book is '书';
2. 字段
comment on column book.book_id is '书ID';