I use PostgreSQL. I have created the following table:
CREATE TABLE "Task"
(
"taskID" serial NOT NULL,
"taskType" text NOT NULL,
"taskComment" text NOT NULL,
"taskDate" date NOT NULL,
CONSTRAINT "Task_pkey" PRIMARY KEY ("taskID")
)
I put taskID as serial
data-type to be incremented automatically. Now I'm confused how to use the INSERT
statement, as the first column in the table is supposed to increment automatically but INSERT
statement asked me to insert a value by myself! Any Idea?
Here is my insert statement:
INSERT INTO "Task" VALUES ('HomeWork', 'No Comment', '3/3/2013');