• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 223
  • Last Modified:

sql Query

How can I rewrite the select statement without using IN


SELECT *
 
FROM dbo.tblcustomers
 
WHERE custstate IN ('CA','MI','WA')

Open in new window

0
iolike
Asked:
iolike
1 Solution
 
asitkaushikCommented:
SELECT *
 
FROM dbo.tblcustomerss
 
WHERE (custstate ='CA' )OR (custstate ='MI') OR (custstate ='WA')
 
This can be one of an alternate query
0
 
iolikeAuthor Commented:
Thanks, it worked
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now