I have 2 tables employee and department.
In department, there is a field dept_count which keeps
track of the number of employees in a certain department.
Every time a new employee is added, there is a sequence
that can auto_increment
eg. employeeNo.NextVal
Question is
1. Is there a way to auto_decrease the department count
every time an employee is deleted?
In department, there is a field dept_count which keeps
track of the number of employees in a certain department.
Every time a new employee is added, there is a sequence
that can auto_increment
eg. employeeNo.NextVal
Question is
1. Is there a way to auto_decrease the department count
every time an employee is deleted?