Click here to Skip to main content
15,891,513 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
i am unable to find any query please help out of here

What I have tried:

sql > select city from salepeople
city = 'london' and 'new york';
Posted
Updated 17-Feb-16 19:40pm

We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

Try it yourself, you may find it is not as difficult as you think!
(Used with permission of OriginalGriff)

You are learning SQL, we can't read the documentation for you.
 
Share this answer
 
Hi Dinesh,

Please Try with Self Join Such as:
SQL
1. SELECT A.* FROM EmployeeList A 
INNER JOIN Employeelist B ON
A.EmployeeId=B.EmployeeId AND A.city IN ('london','new york')


2.SELECT A.* FROM EmployeeList A 
INNER JOIN Employeelist B ON
A.EmployeeId=B.EmployeeId AND (A.city ='london' OR A.city ='new york')


Ashish Nigam
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900