0

I don't have much experience with database so this might look silly.

I just can't query the same column for 2 different values.

This is what I am trying:

where  b.idIndice = 10 and b.idIndice = 20

I have both values in this column

Thanks

1
  • Could you please provide me the sample data? Commented Dec 20, 2012 at 10:40

4 Answers 4

4

Do you mean:

SELECT * FROM TBL b WHERE b.idIndice IN (10, 20)
Sign up to request clarification or add additional context in comments.

Comments

2

Try :

WHERE b.idIndice = 10 OR b.idIndice = 20

Or

WHERE b.idIndice IN(10, 20)

A value can't be equal to 10 and to 20 at the same time.

Comments

2

use in ()

where b.idIndice in (10,20)

refer here

http://www.techonthenet.com/sql/in.php

Comments

2
WHERE  b.idIndice = 10 OR b.idIndice = 20

Comments

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.