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

Popular posts from this blog

How to provide Authorization & Authentication using Asp.net, C#? -

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

How to use Authorization & Authentication in Asp.net, C#? -