postgresql怎么创建主键自增长
2017-04-22 · 知道合伙人软件行家
关注
展开全部
create table test_a
(
id serial,
name character varying(128),
constraint pk_test_a_id primary key( id)
);
NOTICE: CREATE TABLE will create implicit sequence "test_a_id_seq" for serial column "test_a.id"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "pk_test_a_id" for table "test_a"
CREATE TABLE
(
id serial,
name character varying(128),
constraint pk_test_a_id primary key( id)
);
NOTICE: CREATE TABLE will create implicit sequence "test_a_id_seq" for serial column "test_a.id"
NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "pk_test_a_id" for table "test_a"
CREATE TABLE
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询