Click here to Skip to main content
15,907,001 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have one table, and one of the colum of the table is used in other column so pls let me know to use self join or left join in it... i have to use ones 1st coloum id in another colum id as it id used in it.. pls
Posted

1 solution

It's the same as any other join. Try
SQL
SELECT * 
FROM table1 t1
LEFT JOIN table1 t2 ON t1.parent_id = t2.id
 
Share this answer
 
Comments
Shobhana.n 3-Sep-13 13:52pm    
5+

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900