Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Insert into teams1
- select TEAM_ID, TEAM_NAME, MANAGER_ID
- from teams
- Insert into emp1
- select EMPLOYEE_ID, GENDER, DATE_OF_BIRTH, EMP_NAME, TEAM_ID
- from employees
- ALTER TABLE `teams1`
- ADD CONSTRAINT `FK_teams1_emp1` FOREIGN KEY (`manid`) REFERENCES `emp1` (`empid`
- ALTER TABLE `emp1`
- ADD CONSTRAINT `FK_emp1_teams1` FOREIGN KEY (`teamid`) REFERENCES `teams1` (`teamid`) ON UPDATE CASCADE
Add Comment
Please, Sign In to add comment