7
7
7a-6662020-08-16 20:31:51
PostgreSQL
7a-666, 2020-08-16 20:31:51

How to dynamically change the data in the default value?

There is a table of positions (1) in it there is a field number of employees (2). There is a table of employees (3). It is necessary that In the field number of employees (2) there is a default value of the number of employees (3) in this position (1) and that when adding / deleting a new / old employee (3) their number in the position table (3 ) changed.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
tukreb, 2020-08-16
@7a-666

You need triggers
https://en.wikipedia.org/wiki/%D0%A2%D1%80%D0%B8%D...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question