Database Management SystemTU Board 2023
Assume a HR database of a Company. Where primary keys are underlined: employees (EmpID, FirstName, LastName, Salary, DeptID) departments (DeptID, DeptName, LocationID) locations (LocationID,…
5Assume a HR database of a Company. Where primary keys are underlined: employees (EmpID, FirstName, LastName, Salary, DeptID) departments (DeptID, DeptName, LocationID) locations (LocationID, StreetAddress, PostalCode, City, ProvinceNo) Write the SQL queries for each of the following cases. a) The HR department needs a report to display the EmpID, first name, salary, for each employee whose salary is greater than 25,000 and less than 50,000. b) Write a query to display the last name, salary, department name of all employees whose department id is 26. c) Write a query to display the first name, department ID, department name, city for all employees who works in Lalitpur. d) Update the salary of employee with 50000 whose EmpID is 220. e) Create a view for employees table named as EmpView with attributes EmpID, FirstName and Salary.
Discussion
Loading…