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
Post a Comment