the subject is an introduction of what i want...
i wanto to obtain some records from a table where the column value is in a group of values, asorted values...
example:
id,value
1,Martin
2,Omar
3,Pedro
4,Andrea
5,Paola
6,Romina
7,Julieta
8,Yari
I want to obtain the rows where id=1,6,3
one way to do this is:
SELECT * FROM tablename WHERE (id=1) OR (id=6) OR (id=3)
I want to know if there is a simplier and a more flexible way to do that... for example:
SELECT * FROM tablename WHERE (id IN (1,6,3))
(note: the above sintax if invented, i don't know if it is valid or not)
greetz...
Kolo
PS: sorry for my poor english
i wanto to obtain some records from a table where the column value is in a group of values, asorted values...
example:
id,value
1,Martin
2,Omar
3,Pedro
4,Andrea
5,Paola
6,Romina
7,Julieta
8,Yari
I want to obtain the rows where id=1,6,3
one way to do this is:
SELECT * FROM tablename WHERE (id=1) OR (id=6) OR (id=3)
I want to know if there is a simplier and a more flexible way to do that... for example:
SELECT * FROM tablename WHERE (id IN (1,6,3))
(note: the above sintax if invented, i don't know if it is valid or not)
greetz...
Kolo
PS: sorry for my poor english