Question: For this assignment you will be writing T-SQL statements in SSMS. 1)Create a T-SQL select statement that will use an INNER JOIN to pull data
For this assignment you will be writing T-SQL statements in SSMS.
1)Create a T-SQL select statement that will use an INNER JOIN to pull data from both tables based on Departments.ID and Employees.DepartmentID. Return all rows where these columns match. Only show the following columns: DepartmentName, LastName, FirstName, AnnualSalary, and StartDate (in that order).
A)Based on the query you created in the previous step, create a View called viewDepartmentEmployees. Create a T-SQL statement to use the View.
2)Using viewDepartmentEmployees, create T-SQL that will order the view results by DepartmentName. Do not modify the view to do this.
3)Using viewDepartmentEmployees, create T-SQL that will order the view results by Employee LastName. Do not modify the view to do this.
4)Using viewDepartmentEmployees, create T-SQL that will return only those employees with salaries > $100,000. (Hint: Use a WHERE clause). Do not modify the view to do this.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
