sql - Merging 2 simple queries to one query -


i have simple senario executind 2 queries first id table

and using id access information second table.

select id test_1 name = 'example 1'  select * test_2 parent_id = %id retrived above query% 

use in (if subquery returns more 1 id) or = (if subquery returns 1 id):

select * test_2 parent_id = (select id test_1 name = 'example 1') 

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 -