Using "NOT IN" in SQL Server

Ranjeet_8
Posted by Ranjeet_8 under Sql Server category on | Points: 40 | Views : 1475
Query:

SELECT First_Name,City
FROM Employee
WHERE First_Name NOT IN ('Vivek','Ashu');

Result:

First_Name City
Abhi Delhi
Rakesh Noida

Comments or Responses

Posted by: Vikash on: 8/13/2012 Level:Starter | Status: [Member] | Points: 10
SELECT First_Name,City

FROM Employee

WHERE First_Name NOT IN ('Vivek','Ashu');

sorry,i didn't got same result...................
Posted by: Pandians on: 8/13/2012 Level:Silver | Status: [Member] [MVP] | Points: 10
@Ranjeet_8

You need to provide actual sample record/script/result. But, you have given only script and Result

How do other know that how the script working ?

So, Please provide the following also

1. Sample actual records
2. Query
3. Result

So then, visitors can compare the Result with actual sample record and understand! correct ?

Login to post response