1

This question may seem a bit basic but can't seem to Google it up. Maybe it's too basic, no one bothered to make a article or forum post about it.

Anyway, I have a table called locations. I wish to call the row with the value 1, 2 and 3 from the same column. I have been using this method so far:

SELECT * FROM locations WHERE location_id='1' OR location_id='2' OR location_id='3'

However, is there a much simpler way without typing it out all over again. It is the same column afterall.

1 Answer 1

8
SELECT * FROM (table name) where (column name) in [first row,second row]

when [] brackets used then put () brackets when () brackets used then don't put brackets

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you :) Marked ya as answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.