mysql - Selecting data IN(subquery) -


this query works fine:

select *    produkty id_sklep_kategorie in(669, 670, 671, 672,                                              673, 674, 683, 686,                                              687, 688, 689, 690,                                              691, 692, 693, 694,                                              695, 696, 697, 698,                                              699, 700, 701, 845,                                              846, 847, 848, 849,                                              850, 851, 898); 

but want have more automatically, tried this:

select *    produkty id_sklep_kategorie in(select id_sklep_kategorie                                                sklep_kategorie);  
  • but returns me records...

how can this?

it ought return record selecting id_sklep_kategorie inquery. have selected ids inquery, records whole query. per understanding, need pass ids if need specific rows, have provided.


Comments

Popular posts from this blog

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -

YouTubePlayerFragment cannot be cast to android.support.v4.app.Fragment -