0
更新以前的字段中的值我有兩個表:Item_detail(P_name,可用)和Customer_detail(P_name,數量)Substacting從不同的表中的兩個領域,在MySQL
現在我想減去「數量」字段從「可用」字段中選擇,然後在「可用」字段中設置相減的值。我寫這段代碼但它不起作用
update Item_detail
set Available=(
select (A.Available-B.Quantity) as Available
from Item_detail as A
join (select Quantity from Customer_detail where P_name='ipod') as B
where A.P_name='ipod') ;
請幫忙!!