📜  用于存储状态的 sql 表 - SQL 代码示例

📅  最后修改于: 2022-03-11 15:05:18.494000             🧑  作者: Mango

代码示例1
CREATE TABLE status
(
  id integer PRIMARY KEY,
  name TEXT NOT NULL,
  next_status Integer references status
);

insert into status(id, name, next_status)
values 
(1,'init', 2),
(2,'waiting ror price approve', 3),
(3,'sent', 4),
(4,'accepted', 5),
(5,'finished', null);