📜  如何在mysql代码示例中加入结果表

📅  最后修改于: 2022-03-11 15:05:25.130000             🧑  作者: Mango

代码示例1
SELECT inv.product_id, inv_stock.stock
FROM inventories AS inv

JOIN 

(SELECT product_id, stock
FROM inventories ) AS inv_stock

ON inv.product_id = inv_stock.product_id
 ;