I am working on this BANK MANAGEMENT SYSTEM database project (oracle) on sql developer and I have made some progress but I am stuck at this minor problem
The problem: I have a table of employee
with employee id
as primary key and in that table there is an attribute of position
(clerk, manager etc), and branch id
(the branch at which that employee works) which is a foreign key (referenced to branch_id
of branch
table). Then there is a table of branch
with branch id
as primary key and manager_id
as foreign key (referenced to the employee_id
of employee
table).
What kind of query should I write to ensure that the employee who is the manager of that branch also must have the term 'Manager" as his/her position.