Untitled

Anonymous
plain_text
08/10/2023 4:15 AM
544 B
16
Indexable
CREATE DEFINER=`root`@`localhost` PROCEDURE `DisplayBillProducts`(
  IN billId INT
)
BEGIN
  SELECT
    cod.SKU,
    t.Name,
    cod.Quantity,
    cod.Price
  FROM
    CustomerOrderDetail cod
    INNER JOIN CustomerOrder co ON cod.CustomerOrderId = co.CustomerOrderId
    INNER JOIN Bill b ON co.CustomerOrderId = b.CustomerOrderId
    INNER JOIN Toy t ON cod.SKU = t.SKU
  WHERE
    b.BillId = billId;
END
Editor is loading...