Open bingoohuang opened 3 years ago
-- manually input
CREATE TABLE video_sales (
did VARCHAR(40) NOT NULL DEFAULT '',
number INTEGER DEFAULT 0
);
insert into video_sales(did, number) values(null, 1);
-- [23502] ERROR: null value in column "did" violates not-null constraint 详细:Failing row contains (null, 1).
insert into video_sales(number) values(1);
-- [2021-04-23 09:24:44] 1 row affected in 7 ms
select * from video_sales;
-- auto-generated definition
create table video_sales
(
did varchar(40) default ''::character varying not null,
number integer default 0
);
alter table video_sales owner to pg;