JOIN or INNER JOIN in SQL Server
Fill In The Blank
Views 558
Answer:
JOIN or INNER JOIN
Write a query, to retrieve Name, Gender, Salary and DepartmentName from Employees and Departments table. The output of the query should be as shown below.
Code:
SELECT Name, Gender, Salary, DepartmentName FROM tblEmployee INNER JOIN tblDepartment ON tblEmployee.DepartmentId = tblDepartment.Id
OR
SELECT Name, Gender, Salary, DepartmentName FROM tblEmployee JOIN tblDepartment ON tblEmployee.DepartmentId = tblDepartment.Id
Note:
Related Articles:
This section is dedicated exclusively to Questions & Answers. For an in-depth exploration of SQL, click the links and dive deeper into this subject.
Join Our telegram group to ask Questions
Click below button to join our groups.