小编Chr*_*ick的帖子

如何将表 ID 从序列号更改为标识号?

我在 Postgres 10.10 中有下表:

  Table "public.client"
       Column        |  Type   | Collation | Nullable |                 Default                  
---------------------+---------+-----------+----------+------------------------------------------
 clientid            | integer |           | not null | nextval('client_clientid_seq'::regclass)
 account_name        | text    |           | not null | 
 last_name           | text    |           |          | 
 first_name          | text    |           |          | 
 address             | text    |           | not null | 
 suburbid            | integer |           |          | 
 cityid              | integer |           |          | 
 post_code           | integer |           | not null | 
 business_phone      | text    |           |          | 
 home_phone …
Run Code Online (Sandbox Code Playgroud)

sql postgresql ddl auto-increment

5
推荐指数
1
解决办法
1470
查看次数

标签 统计

auto-increment ×1

ddl ×1

postgresql ×1

sql ×1