Thursday, August 4, 2016

SQL DB Table Join

Join query




christyjs
now i'm working on datalist control in asp.net, now i want to join query for this purposes..

i have the three table, tblstudent, tbllang, tblstudlang,

i want to bind the columns name of firstname and courseoffered from tblstudent and its id is studentid, and languagename from tbllang and first its joining with tbllang's id is laguageid, and tblstudlang's id is languageid..

help me please...

Kara Hewett

Kara Hewett
select * from tblstudent a, tbllang b, tblstudlang c
where a.studentid = b.studentid and
b.languageid = c.languageid

The three tables are given an identifier such as a, b, and c. Then the tables are joined on the column which is shared between the tables.

No comments:

Post a Comment