Documents Table | ||
Doc_ID | Title | Doc_type_id |
101 | Creating A Relational Database | 11 |
102 | Using Stored Procedures | 12 |
103 | Caching Queries | |
104 | Joining Tables Together | 11 |
Doc Types Table | ||
type_id | doc_type | |
11 | Word | |
12 | ||
13 | XML |
SELECT doc.doc_id, doc.title, dt.doc_type
FROM tblDocuments doc INNER JOIN
tblDocType dt
ON doc.doc_type_id = dt.type_id
ORDER BY doc.doc_id
Inner Join | ||
Title | Doc Type | |
Creating A Relational Database | Word | |
Using Stored Procedures | ||
Joining Tables Together | Word |