2000字范文,分享全网优秀范文,学习好帮手!
2000字范文 > Postgres数据库增加表字段 注解语句 修改字段长度 修改字段名称

Postgres数据库增加表字段 注解语句 修改字段长度 修改字段名称

时间:2019-11-16 06:55:08

相关推荐

Postgres数据库增加表字段 注解语句 修改字段长度 修改字段名称

-- 新增字段alter table xxx add column created_by varchar(42) DEFAULT nullalter table xxx add column created_date TIMESTAMP DEFAULT nullalter table xxx add column updated_by varchar(42) DEFAULT nullalter table xxx add column updated_date TIMESTAMP DEFAULT nullcomment on column xxx.created_by is '创建人'comment on column xxx.created_date is '创建时间'comment on column xxx.updated_by is '修改人'comment on column xxx.updated_date is '修改时间'-- 修改字段长度alter table 表名alter column 字段名type character varying(20);-- 修改字段名称ALTER TABLE 表名 RENAME 原字段名TO 新字段名;

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。