mysql - How to take more than one rows from condition? -


i have 2 different tables. first contains following columns: id, names , id_of_exec, other: id_of_exec , name_of_exec. want join them, i'm having problem join condition:

on (x.id_of_exec = y.id_of_exec , ( y.name = "xyz" or y.name = "abc")) 

(names - xyz , abc have different id_of_exec)
, there problem because column id_of_exec has same id_of_exec more 1 id , sql shows me y.name = "xyz". how results of both xyz + abc. on end i'm grouping names because need names 1st table there names 2nd table xyz + abc.
tried use select behind , select returns more 1 row.

on (x.id_of_exec = y.id_of_exec ) ( y.name = "xyz" or y.name = "abc") 

the above query join on id_of_exec , filter records based on values "xyz" or "abc" .


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -