題組內容

二、考慮下列關聯式資料庫的三個 table:顧客(Customer)、產品(Product)和交易 (Transaction)。他們的結構(schema)定義如下:Customer(cName, cID, address)、 Product(pName, pID, price)、Transaction(cID, pID, amount)。 (每小題 10 分,共 20 分)

⑴顧客「李大同」要買產品「H 牌手機」一支,請寫出 SQL 指令來更新 table。

詳解 (共 4 筆)

Lin Jai Shing
Lin Jai Shing
詳解 #4112397
2020/07/04
INSERT into Transact...
(共 211 字,隱藏中)
前往觀看
牛奶鍋
牛奶鍋
詳解 #3860273
2020/04/02

insert into Transaction (cid, pid,amount)

select cid, pid, price
from customer, product  
where customer.cname='李大同' and product.pname='H牌手機’;
1990y11m17d
1990y11m17d
詳解 #1767139
2016/07/08
Insert into Transaction Select cID, (Select pID from Product Where pName = 'H牌手機'),1 From Custom Where cName='李大同'
Yui
Yui
詳解 #3918323
2020/04/30
請問為什麼2F 3F的語法中amount...
(共 41 字,隱藏中)
前往觀看