软件下载吧文章资讯

分类分类

PostgreSQL 数据库基础 自增语法的用法

2024-02-05 12:47作者:下载吧

mysql使用auto_increment的语法实现表字段自增。

在PostgreSQL中,具有数据类型为smallserial,serial,bigserial的字段具有自增特性。

create table company(
id serial primary key,
name text not null,
age int not null,
address char(50),
salary real
);

展开全部

相关文章

说两句网友评论
    我要跟贴
    取消