I have two tables and I want to create a third that join the other two.
My purpose is creating a CRUD app to switch employees over departments
| id | Name | Other | |----|------|-------| | 1 | John | x | | 2 | Jack | y | | 3 | Phil | z |
| id | Name| Zone | |----|-----|------| | 1 | WH1 | a | | 2 | WH2 | b | | 3 | WH3 | c |
I want create a third table named Situation that has Employee name and Department name and zone.
- one employee can be only in one department
- one department can contain more employees but also zero
How to do that?
And, is that the best practice?
Every employee switch frequently over departments.
Link: Join two tables to create a third one sql
Source: Stack Sql