NOT IN
========
SELECT *
FROM Emptable
WHERE (Departmentid NOT IN (SELECT Departmentid
FROM Emptable AS Emptable_1
WHERE (Empid < 5)
)
)
GO
<> ALL
======
SELECT *
FROM Emptable
WHERE (Departmentid <> ALL (SELECT Departmentid
FROM Emptable AS Emptable_1
WHERE (Empid < 5)
)
)
GO
***both query will produce same output.
No comments:
Post a Comment