上自動增量查詢我有以下數據庫:我對SQLite數據庫
CREATE TABLE QUESTION (
QUES_ID INTEGER AUTO INCREMENT,
TOPIC_ID INTEGER NOT NULL,
QUESTION_DESC TEXT NOT NULL,
CHOICE_A TEXT,
CHOICE_B TEXT,
CHOICE_C TEXT,
CHOICE_D TEXT,
PRIMARY KEY (QUES_ID,TOPIC_ID),
FOREIGN KEY (TOPIC_ID) REFERENCES TOPIC(TOPIC_ID)
);
當我插入信息這樣的...
INSERT INTO
QUESTION (TOPIC_ID,QUESTION_DESC,CHOICE_A,CHOICE_B,CHOICE_C,CHOICE_D)
VALUES
(1,'Blue or blue?','red?','yellow?','black?','yellow again?');
我得到下面的結果,在ques_id
沒有分配!
QUES_ID TOPIC_ID QUESTION_DESC CHOICE_A CHOICE_B CHOICE_C CHOICE_D
---------- --------- ------------- --------- --------- --------- -------------
1 Blue or blue? red? yellow? black? yellow again?
這不會剝奪我與主題表的合格協作嗎? – mister 2012-01-31 06:05:09