PostgreSQL 主键自动增长

建立主键并设置自动增加的办法好好几种,这里记录我测试过的:

drop table pro_process;
CREATE TABLE "public"."pro_process" (
"id" SERIAL primary key, //设置主键并自动增长
"county_code" varchar(6) COLLATE "default" NOT NULL,
"county_name" varchar(50) COLLATE "default" NOT NULL,
"creator" varchar(100) COLLATE "default" NOT NULL,
"create_time" date NOT NULL
)
WITH (OIDS=FALSE)
; ALTER TABLE "public"."pro_process" OWNER TO "postgres";

参考:

http://blog.csdn.net/dracotianlong/article/details/7946035

上一篇:AS3 - 对文件和目录的操作


下一篇:Android Fragment用法知识点的讲解