sql - How to retrieve values from 4 tables -
table 1
age address city id table 2
name address pincode id table 3
name address pancard id table 4
name address voter id id i want retrieve values table 1 , table 2 first , secondly
i want retrieve value table 3 , table 4, after want retrieve values result table 1 , 2 , table 3 , 4 combined
i want retrieve age first table, address second table, pancard third table , voterid fourth table
you can try this:-
select t1.age, t2.address, t3.pancard, t4.voter_id table1 t1 join table2 t2 on t1.id = t2.id join table3 t3 on t2.id = t3.id join table4 t4 on t3.id = t4.id
Comments
Post a Comment