Friday, October 15, 2010

Join More than one table in SQL (SQL JOINS)

Here i am showing how to join more than one table with another table
For Example I have 3 Tables data as the following

EX: I need to get all the information in a single sql statement which is stored in 3 different  table
Sol: Sql query :

select std.studid,std.studentname,stdr.Sub1Marks,stdr.Sub2Marks,stdinfo.std_address,stdinfo.std_cell from student_data as std
join student_result as stdr on studentId=std.studid
join student_personnalinfo as stdinfo on std_id=studentId

Result of the Above Query is :

I hope it will helps you while you join more than one table in sql

No comments:

Post a Comment