Following is the schema of my Tables:
- Marks_Table (SubjectCode,TypeID,MarksObtd)
- Subjects_Table (SubjectCode, Subject)
- Types_Table (TypeID, Type)
I want to Select the Marks_Table table with SubjectCode and TypeID replaced with appropriate Subject and Type.
I wrote the following query:
SELECT [Subject] , [Type] , MarksObtd FROM [Marks_Table] INNER JOIN [Subjects_Table] ON [Marks_Table].SubjectCode = [Subjects_Table].SubjectCode INNER JOIN [Types_Table] ON *XXXXXXXXXXXXXXX*.TypeID = [Types_Table].TypeID
What should I write in place of XXXXXXXXXXXXXXX ? What should be the name of the table that has not been created yet?
It can be done in two queries, but is it possible to do this like above? and how?