Answers for "sql design define a status"

SQL
0

sql table to store status

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);
Posted by: Guest on October-26-2020

Code answers related to "SQL"

Browse Popular Code Answers by Language