Download presentation
Presentation is loading. Please wait.
1
Looking at using multiple tables
Looking at using multiple tables. This example uses the donor table, the donation table and the drive table.
2
This is one approach, I have asked you to check JOIN in your book or on line.
3
Note that in the select, any field that appears on both tables such as driveno has to have the table.fieldname to avoid confusion.
5
Without the where clause, I get every possible combination.
8
The where cluase can also set other criteria such as driveno > '100'.
9
Relating the donor and donation tables based on idno and the donation and drive tables based on driveno.
10
This example has a customer table, an inventory table, an orders table, an order line item table, a sales person table and a department table. See slides ahead.
11
Shows the relationship among the first four tables.
13
I should call the fields by the same name
I should call the fields by the same name. Here on the customer table I called in slsrep and on the sales person table I called it salsrep. I should have made them the same.
16
Relating the inventory table and the department table based on dept
Relating the inventory table and the department table based on dept. Note taht dept is a text field.
17
Relating the orders table and the customer table based on custid.
Relating the order table and the order line item table based on order number.
19
Relating the order table and the order line item table based or order number and the order table and the inventory table based on item number.
20
Relating the order and order line item table based on order number and the order and customer tables based on customer id and the order line item table and the inventory table based on itemno.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.