[英]postgres - how to alter a column with timestamp?
In postgre sql - How do I alter a column which has time stamp.在 postgre sql 中 - 如何更改具有时间戳的列。 Currently the column is defined as below -目前该列定义如下 -
creation_time timestamp(6) with time zone
and i want to make the above column not null also.我也想让上面的列不为空。 So i have tried below but had no luck所以我在下面尝试过但没有运气
ALTER TABLE my_table ALTER COLUMN creation_time TYPE timestamp(6) with time zone NOT NULL;
What is the correct syntax ?什么是正确的语法?
根据文档:
alter table my_table alter creation_time set not null;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.