一、postgresSQL自增主键跟mysql不同,使用:SERIAL
CREATE TABLE USERS(
ID SERIAL PRIMARY KEY,
NAME varchar(300) DEFAULT NULL,
EMAIL varchar(300) DEFAULT NULL,
AGE varchar(300) DEFAULT NULL,
SEX varchar(300) DEFAULT NULL,
ID_CARD varchar(300) DEFAULT NULL,
MOBILE_PHONE varchar(300) DEFAULT NULL,
VISA_CARD varchar(300) DEFAULT NULL,
OFFICER_CARD varchar(300) DEFAULT NULL,
ADDRESS varchar(300) DEFAULT NULL
)
插入数据:
INSERT INTO USERS (NAME,EMAIL,AGE,SEX,ID_CARD,MOBILE_PHONE,VISA_CARD,OFFICER_CARD,ADDRESS) VALUES ('陈欢', 'www5@163.com', '1', 'M', '460025198109101501', '13581696800', 'SYP618183458', '军字第00111209号', '北京市朝阳区立水桥北')
参考:postgresql主键自增
https://www.cnblogs.com/haolb123/p/14317774.html
oracle主键自增参考:https://www.jb51.net/article/84782.htm