我有這樣的說法:INSERT INTO與子查詢的MySQL
INSERT INTO qa_costpriceslog (item_code, invoice_code, item_costprice)
VALUES (1, 2, (SELECT item_costprice FROM qa_items WHERE item_code = 1));
我試圖插入值複製item_costprice的數據相同,但給我的錯誤:
Error Code: 1136. Column count doesn't match value count at row 1
我如何可以解決這個?
哇,真是太感謝您是我需要的+ REP :) –