- 论坛徽章:
- 0
|
CREATE TABLE s_dept
(id VARCHAR(3) CONSTRAINT s_dept_id_nn NOT NULL,
name VARCHAR(20) CONSTRAINT s_dept_name_nn NOT NULL,
region_id VARCHAR(3),
CONSTRAINT s_dept_id_pk PRIMARY KEY (id),
CONSTRAINT s_dept_name_region_id_uk UNIQUE (name, region_id)
);
我在db2中执行报错:
valid Command Line Processor command. During SQL processing it returned:
SQL0104N An unexpected token "NOT NULL" was found following
"<col_constraint_name_defn>;". Expected tokens may include: "FOREIGN KEY,
PRIMARY KEY, CHECK". SQLSTATE=42601
不知道怎么回事,请高手指点 |
|