错误:“interaction_id”列中的空值违反非空约束

时间:2014-12-29 14:00:43

标签: postgresql

帮助。请。

表,序列和下面显示的任一命令都会出错。这是旧故事,它有效,我清除了数据库准备进行演示,并且.......

CREATE SEQUENCE interaction_seq;
CREATE TABLE IF NOT EXISTS Interact (
     webRequest text NOT NULL,
     interaction_id integer DEFAULT nextval('interaction_seq'),
     cTime timestamp without time zone DEFAULT now() ,
     uid integer default NULL,
     successful boolean default(false)
);
insert into interact values ('::COOKIE::::',DEFAULT);
insert into interact values ('::COOKIE::::');

对我来说,第一个,至少,应该工作。

非常感谢。

0 个答案:

没有答案
相关问题