-2
SELECT nom AS Nom, id_type_produit, id_format
FROM dbo.Produits
此只顯示我的id_type
和id_Format
的ID我需要顯示他們的值(在其他2表中,像id_format = 1 = 750毫升)和類型= 1 =酒..SQL SELECT顯示問題
但是當我做選擇我只看到1和2我沒有看到750 ml和葡萄酒
SELECT nom AS Nom, id_type_produit, id_format
FROM dbo.Produits
此只顯示我的id_type
和id_Format
的ID我需要顯示他們的值(在其他2表中,像id_format = 1 = 750毫升)和類型= 1 =酒..SQL SELECT顯示問題
但是當我做選擇我只看到1和2我沒有看到750 ml和葡萄酒
SELECT nom AS Nom, Produits.id_type_produit, type_produits.value, Produits.id_format, formats.value
FROM dbo.Produits
INNER JOIN dbo.type_produits ON Produits.id_type_produit = type_produits.id_type_produit
INNER JOIN dbo.dbo_formats ON Produits.id_format = formats.id_format
哪些其他兩個表(包含類型和格式的值)稱爲? – 2013-02-19 01:38:04
dbo.type_produits和dbo_formats – 2013-02-19 01:39:30
請添加表格結構(所有3個表格),示例數據,預期輸出和現在卡住的位置。 – 2013-02-19 01:40:06