我想通過IdProduct在表客戶和表產品之間建立鏈接。Mysql外鍵
例子:
Create table customer(
idcustomer INT not null,
name Varchar(20),
idproduct INT,
);
create table Product(
idproduct INT not null,
nameProduct varchar(40)
);
我如何可以鏈接在一起,就像爲外鍵系統中的兩個,當我選擇一個客戶,我可以得到他所有的產品?這是關於數據庫結構的問題。
我知道,這只是一個純粹的例子,我只是想加入該表,當我選擇一個客戶,我可以把他的產品 – ThorDozer 2011-05-24 21:47:58