-- 使用SERIAL自增主键
create table open.t_test(id SERIAL primary key,name varchar(20)
);
-- 创建索引
CREATE UNIQUE INDEX t_test_pkey ON open.t_test USING btree (id);
-- 插入
insert into open.t_test (name) values ('daiyuanpei');
-- 使用SERIAL自增主键
create table open.t_test(id SERIAL primary key,name varchar(20)
);
-- 创建索引
CREATE UNIQUE INDEX t_test_pkey ON open.t_test USING btree (id);
-- 插入
insert into open.t_test (name) values ('daiyuanpei');