做畢業專題遇到兩個資料表做關聯問題
有兩個資料表
[Menudata]
(MealNumber) (SNumber) (Classification) (MealName) (Price)
[nReservedata]
(SNumber) (Odnumber) (MealNumber) (amount) (UAccount) (tmealday) (tmealtime) (Price) (Total) (OfferID) (IO)
該怎麼用兩個資料表都有的(SNumber)欄位去做關聯
然後select出來
(Odnumber)(UAccount)(tmealday)(tmealtime)(OfferID)(MealName)(amount)(Price) (Total)這些欄位??
SELECT R.Odnumber, R.UAccount, R.tmealday, R.tmealtime, R.OfferID, M.MealName, R.amount, R.Price, R.Total
FROM Menudata M, nReservedata R
WHERE M.SNumber = R.SNumber
要過年了