How to use Subquery in Where Clause Archives - Tech Insights https://reactconf.org/category/how-to-use-subquery-in-where-clause/ Unveiling Tomorrow's Tech Today, Where Innovation Meets Insight Sat, 18 Oct 2014 17:51:00 +0000 en-US hourly 1 https://wordpress.org/?v=6.6.2 https://i0.wp.com/reactconf.org/wp-content/uploads/2023/11/cropped-reactconf.png?fit=32%2C32&ssl=1 How to use Subquery in Where Clause Archives - Tech Insights https://reactconf.org/category/how-to-use-subquery-in-where-clause/ 32 32 230003556 How to use Subquery in Where Clause https://reactconf.org/how-to-use-subquery-where-clause/ https://reactconf.org/how-to-use-subquery-where-clause/#respond Sat, 18 Oct 2014 17:51:00 +0000 http://www.sqlneed.com/2014/10/18/how-to-use-subquery-in-where-clause/ This article describes how to use subquery in where clause. SELECT Title,EmployeeID,NationalIDNumber,ManagerID FROM dbo.HumanResources_Employee WHERE EmployeeID IN (SELECT EmployeeID FROMdbo.HumanResources_EmployeeDepartmentHistory WHERE DepartmentID IN (SELECT DepartmentID FROMdbo.HumanResources_Department WHERE  GroupName  IN (‘Research …

The post How to use Subquery in Where Clause appeared first on Tech Insights.

]]>
This article describes how to use subquery in where clause.
SELECT Title,EmployeeID,NationalIDNumber,ManagerID
FROM dbo.HumanResources_Employee WHERE EmployeeID IN
(SELECT EmployeeID FROMdbo.HumanResources_EmployeeDepartmentHistory WHERE DepartmentID
IN (SELECT DepartmentID FROMdbo.HumanResources_Department WHERE  GroupName  IN (‘Research and Development’,‘Executive General and Administration’)))
SELECT Title,EmployeeID,NationalIDNumber,ManagerID
FROM dbo.HumanResources_Employee WHERE EmployeeID IN
(SELECT EmployeeID FROMdbo.HumanResources_EmployeeDepartmentHistory 
WHERE DepartmentID
IN (SELECT  top 5 DepartmentID FROMdbo.HumanResources_Department  ))

order by ManagerID


The post How to use Subquery in Where Clause appeared first on Tech Insights.

]]>
https://reactconf.org/how-to-use-subquery-where-clause/feed/ 0 34