I want a SQL query that retrieves columns from different tables in Visual Basic 2010.
I have four tables like this:
tblTeacherconsists of•
TID(pk)
•TNametblSubjectconsists of•
SID(pk)
•subName
•TID(fk)
•TMID(fk)tblTimeconsists of•
TMID(pk)
•TMValuetblLectureconsists of•
LecID(pk)
•LecDate
•TID(fk)
•subID(fk)
•TMID(fk)
tblLecture is for registered Lectures. There is a one-to-many relationship between the tables, wheretblLecture is many. Now my question is:
I want a SQL query that retrieves the registered Lectures and returns columns LecID, LecDate, TName, subName, TMValue. I want to view the results in a DataGridView.
How can I call this SQL in my project please? (In my project, I use an Access database and SQL.)