postgres -如何修改一个列与时间戳?



在postgre sql -我如何改变一个列有时间戳。目前,该列定义如下-
creation_time timestamp(6) with time zone
,我想使上述列也不为空。所以我在下面试过,但没有运气

ALTER TABLE my_table ALTER COLUMN creation_time TYPE timestamp(6) with time zone NOT NULL;

正确的语法是什么?

根据文档:

alter table my_table alter creation_time set not null;

相关内容