删除了非空,ID 没了....,而且只有活字格添加的时候没有,用代码添加时有的。
CREATE SEQUENCE guard_seq START WITH 1
INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1;
CREATE TABLE public.guard (
id int4 not NULL DEFAULT nextval('guard_seq'::regclass),
guardiccard varchar(50) NULL,
guardname varchar(50) NULL,
guardtel varchar(50) NULL,
guardpno varchar(50) NULL,
guardphoto varchar(200) NULL,
recordtime timestamp NULL DEFAULT CURRENT_TIMESTAMP
);
alter table public.guard alter id drop not null
---代码添加时有的
INSERT INTO public.guard
(guardiccard, guardname, guardtel, guardpno, guardphoto, recordtime)
VALUES('12222222', '古月衣', '18678811111', 'P007155', '', CURRENT_TIMESTAMP);
|