EMPLOYEE Commission Emp-ld 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 Emp-Name M. Junaid M. Usman M. Awais M. Jawad M. Ali M. Azhar M. Adeel M. Imran M. Nazer M. Asad M. Sadiq M. Kamarn M. Khuram M. Usama Job Title PRESIDENT MANAGER MANAGER MANAGER ANALYST ANALYST CLERK SALESMAN SALESMAN SALESMAN SALESMAN CLERK CLERK CLERK Hire-Date 1991-11-18 1991-05-01 1991-06-09 1991-04-02 1997-04-19 1991-12-03 1990-12-18 1991-02-20 1991-02-22 1991-09-28 1991-09-08 1997-05-23 1991-12-03 1992-01-23 Salary 6000.00 USD 2750.00 USD 2550.00 USD 2957.00 USD 3100.00 USD 3100.00 USD 900.00 USD 1700.00 USD 1350.00 USD 1350.00 USD 1600.00 USD 1200.00 USD 1050.00 USD 1400.00 USD 400.00 USD 600.00 USD 1500.00USD 0.00 USD Consider relation EMPLOYEE. Suppose there are two applications that access EMPLOYEE. The first is issued at four sites and attempts to find the Salary of employee by given their numbers. Assume that we have set the simple predica
INSERT INTO `employeemanagementsystem`.`employees` (`Emp_ld`, `Emp_Name`, `Job_Title`, `Hire_Date`, `Salary`) VALUES ('1001', 'M. Junaid', 'PRESIDENT', '1991-11-18', '6000.00 USD');
INSERT INTO `employeemanagementsystem`.`employees` (`Emp_ld`, `Emp_Name`, `Job_Title`, `Hire_Date`, `Salary`) VALUES ('1002', 'M. Usman', 'MANAGER', '1991-05-01', '2750.00 USD');
INSERT INTO `employeemanagementsystem`.`employees` (`Emp_ld`, `Emp_Name`, `Job_Title`, `Hire_Date`, `Salary`) VALUES ('1003', 'M. Awais', 'MANAGER', '1991-06-09', '2550.00 USD');
INSERT INTO `employeemanagementsystem`.`employees` (`Emp_ld`, `Emp_Name`, `Job_Title`, `Hire_Date`, `Salary`) VALUES ('1004', 'M. Jawad', 'MANAGER', '1991-04-02', '2957.00 USD');
INSERT INTO `employeemanagementsystem`.`employees` (`Emp_ld`, `Emp_Name`, `Job_Title`, `Hire_Date`, `Salary`) VALUES ('1005', 'M. Ali', 'ANALYST', '1997-04-19', '3100.00 USD');
INSERT INTO `employeemanagementsystem`.`employees` (`Emp_ld`, `Emp_Name`, `Job_Title`, `Hire_Date`, `Salary`) VALUES ('1006', 'M. Azhar', 'ANALYST', '1991-12-03', '3100.00 USD');
INSERT INTO `employeemanagementsystem`.`employees` (`Emp_ld`, `Emp_Name`, `Job_Title`, `Hire_Date`, `Salary`) VALUES ('1007', 'M. Adeel', 'CLERK', '1990-12-18', '900.00 USD');
INSERT INTO `employeemanagementsystem`.`employees` (`Emp_ld`, `Emp_Name`, `Job_Title`, `Hire_Date`, `Salary`) VALUES ('1008', 'M. Imran', 'SALESMAN', '1991-02-20', '1700.00 USD');
INSERT INTO `employeemanagementsystem`.`employees` (`Emp_ld`, `Emp_Name`, `Job_Title`, `Hire_Date`, `Salary`) VALUES ('1009', 'M. Nazer', 'SALESMAN', '1991-02-22', '1350.00 USD');
INSERT INTO `employeemanagementsystem`.`employees` (`Emp_ld`, `Emp_Name`, `Job_Title`, `Hire_Date`, `Salary`) VALUES ('1010', 'M. Asad', 'SALESMAN', '1991-09-28', '1350.00 USD');
INSERT INTO `employeemanagementsystem`.`employees` (`Emp_ld`, `Emp_Name`, `Job_Title`, `Hire_Date`, `Salary`) VALUES ('1011', 'M. Sadiq', 'SALESMAN', '1991-09-08', '1600.00 USD');
INSERT INTO `employeemanagementsystem`.`employees` (`Emp_ld`, `Emp_Name`, `Job_Title`, `Hire_Date`, `Salary`) VALUES ('1012', 'M. Kamarn', 'CLERK', '1997-05-23', '1200.00 USD');
INSERT INTO `employeemanagementsystem`.`employees` (`Emp_ld`, `Emp_Name`, `Job_Title`, `Hire_Date`, `Salary`) VALUES ('1013', 'M. Khuram', 'CLERK', '1991-12-03', '1050.00 USD');
INSERT INTO `employeemanagementsystem`.`employees` (`Emp_ld`, `Emp_Name`, `Job_Title`, `Hire_Date`, `Salary`) VALUES ('1014', 'M. Usama', 'CLERK', '1992-01-23', '1400.00 USD');
Select salary from the employees id
SELECT Emp_ld, Salary
FROM employeemanagementsystem.employees
where Emp_ld=1009;
Comments
Leave a comment