I am trying to make a query which will search for the ID's 5, 6 and 23(Those are just random numbers and could potentially be more). Rather than making a loop in my code to query each separate ID I was wondering if it was possible to query them all at once and return each row for the individual IDs.
Rambomst
0
Newbie Poster
Recommended Answers
Jump to PostHello,
All you have to do is select from a list like this:
Select * from table1 where ID in (5, 6, 23)
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.