在postgres sql中创建表作为select删除了表上的not null约束.
例如 :
create table A (char a not null);
create table B as select * from a;
select * from B;-- no constraint is copied from A table
Run Code Online (Sandbox Code Playgroud)
请告诉我如何复制表格数据以及postgres中的约束.
sql ×1