please help me with the queries M10_Chap7_RQ_WPC-Database Lab , the possible tha
ID: 3701541 • Letter: P
Question
please help me with the queries M10_Chap7_RQ_WPC-Database Lab , the possible
thank you.
7.57 Write an UPDATE statement to change the phone number of employee with EmployeeNumber 11 to 360-287-8810. Run this SQL statement, and document/copy it to CREATE WPC-Update-Data.sql
7.58 Write an UPDATE statement to change the department of employee with EmployeeNumber 5 to Finance. Run this SQL statement, and document/copy it to CREATE WPC-Update-Data.sql.
7.59 Write an UPDATE statement to change the phone number of employee with EmployeeNumber 5 to 360-287-8420. Run this SQL statement, and document/copy it to CREATE WPC-Update-Data.sql.
7.60 Combine your answers to Review Questions 7.58 and 7.59 into one SQL statement. Run this statement, and document/copy it to CREATE WPC-Update-Data.sql.
7.61 Write an UPDATE statement to set HoursWorked to 60 for every row in ASSIGNMENT having the value 10 for EmployeeNumber. Run this statement, and document/copy it to CREATE WPC-Update-Data.sql
7.67 Write an SQL statement to create a view named EmployeePhoneView that shows the values of EMPLOYEE.LastName as EmployeeLastName, EMPLOYEE.FirstName as EmployeeFirstName, and EMPLOYEE.Phone as EmployeePhone. Run this statement, and then test the view with an SQL SELECT statement.
7.68 Write an SQL statement to create a view named FinanceEmployeePhoneView that shows the values of EMPLOYEE.LastName as EmployeeLastName, EMPLOYEE.First-Name as EmployeeFirstName, and EMPLOYEE.Phone as EmployeePhone for employees who work in the Finance department. Run this statement, and then test the view with an SQL SELECT statement.
7.69 Write an SQL statement to create a view named CombinedNameEmployeePhoneView that shows the values of EMPLOYEE.LastName, EMPLOYEE.FirstName, and EMPLOYEE.Phone as EmployeePhone, but that combines EMPLOYEE.LastName and EMPLOYEE.FirstName into one column named EmployeeName that displays the employee name first name first. Run this statement, and then test the view with an SQL SELECT statement.
7.70 Write an SQL statement to create a view named EmployeeProjectAssignmentView that shows the values of EMPLOYEE.LastName as EmployeeLastName, EMPLOYEE.First-Name as EmployeeFirstName, EMPLOYEE.Phone as EmployeePhone, and PROJECT.Name as ProjectName. Run this statement, and then test the view with an SQL SELECT statement.
7.84 Create and test a user-defined function named LastNameFirst that combines two parameters named FirstName and LastName into a concatenated name field formatted LastName, FirstName (including the comma and space).
7.85 Create and test a view called EmployeeDepartmentDataView that contains the employee name concatenated and formatted as LastName, FirstName in a field named EmployeeName, EMPLOYEE.Department, DEPARTMENT.OfficeNumber,DEPARTMENT.Phone as DepartmentPhone, and EMPLOYEE.Phone as EmployeePhone. Run this statement to create the view, and then test the view by writing and running an appropriate SQL SELECT statement.
Explanation / Answer
Question : Write an UPDATE statement to change the phone number of employee with EmployeeNumber 11 to 360-287-8810.
Answer: Update <Table_Name> set phoneNumber = 3602878810 where EmployeeNumber = 11
Question : Write an UPDATE statement to change the department of employee with EmployeeNumber 5 to Finance. Run this SQL statement, and document/copy it to CREATE WPC-Update-Data.sql.
Answer: Update <Table_Name> set department = "Finance" where EmployeeNumber = 5;
Question : Write an UPDATE statement to change the phone number of employee with EmployeeNumber 5 to 360-287-8420. Run this SQL statement, and document/copy it to CREATE WPC-Update-Data.sql.
Answer: Answer: Update <Table_Name> set phoneNumber = 3602878420 where EmployeeNumber = 5
Question: Combine your answers to Review Questions 7.58 and 7.59 into one SQL statement. Run this statement, and document/copy it to CREATE WPC-Update-Data.sql.
Answer: Update <Table_Name> set phoneNumber = 3602878420 , department = "Finance" where EmployeeNumber = 5
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.