Click here to Skip to main content
14,643,391 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hello,

I want to know the procedure of how to write the query to display all the rows of child columns based on the particular parent column using the parent's column id from one or more tables


please give me the solution for the query.
Posted
Updated 12-Jul-11 23:11pm
v2
Rate this:
Please Sign up or sign in to vote.

Solution 1

   
Rate this:
Please Sign up or sign in to vote.

Solution 2

Use JOINS[^]
SELECT B.* FROM parenttable A INNER JOIN childtable B ON A.parentcolumnid = B.parentcolumnid 
   
Rate this:
Please Sign up or sign in to vote.

Solution 3

Take a look at this article[^]
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100