Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. SELECT
  2. t1.idOpportunities, t2.idEmploymentType, t2.Description
  3. FROM
  4. cnt4704p2.opportunities t1
  5. INNER JOIN
  6. cnt4704p2.employmenttype t2 ON t1.EmploymentTypeId = t2.idEmploymentType;
  7.  
  8. CREATE TABLE `opportunities` (
  9. `idOpportunities` int(11) NOT NULL,
  10. `Postion` varchar(150) DEFAULT NULL,
  11. `EmploymentTypeId` int(11) DEFAULT NULL,
  12. `PayRate` decimal(10,2) DEFAULT NULL,
  13. `PayPeriodTypeId` int(11) DEFAULT NULL,
  14. `idEmployers` int(11) DEFAULT NULL,
  15. PRIMARY KEY (`idOpportunities`),
  16. KEY `idEmployers_idx` (`idEmployers`),
  17. KEY `idEmploymentTypeId_idx` (`EmploymentTypeId`),
  18. KEY `fk_idPeriodType_idx` (`PayPeriodTypeId`),
  19. CONSTRAINT `fk_idEmployers` FOREIGN KEY (`idEmployers`) REFERENCES `employers` (`idEmployers`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  20. CONSTRAINT `fk_idEmploymentTypeId` FOREIGN KEY (`EmploymentTypeId`) REFERENCES `employmenttype` (`idEmploymentType`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  21. CONSTRAINT `fk_idPeriodType` FOREIGN KEY (`PayPeriodTypeId`) REFERENCES `periodtypes` (`idPeriodTypes`) ON DELETE NO ACTION ON UPDATE NO ACTION
  22. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  23.  
  24. CREATE TABLE `employmenttype` (
  25. `idEmploymentType` int(11) NOT NULL AUTO_INCREMENT,
  26. `Description` varchar(45) DEFAULT NULL,
  27. PRIMARY KEY (`idEmploymentType`),
  28. KEY `idx_EmploymentTypeId` (`idEmploymentType`)
  29. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement