Skip to content

Commit

Permalink
working procedure
Browse files Browse the repository at this point in the history
  • Loading branch information
volry committed Aug 2, 2024
1 parent c6bbca7 commit f5a7121
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions task.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
USE ShopDB;

-- Create your stored procedure here
DELIMITER //

CREATE PROCEDURE get_warehouse_product_inventory(IN warehouse_id INT)
BEGIN
SELECT p.Name AS ProductName, pi.WarehouseAmount
FROM ProductInventory pi
JOIN Products p ON pi.ProductID = p.ID
WHERE pi.WarehouseID = warehouse_id;
END //

DELIMITER ;

0 comments on commit f5a7121

Please sign in to comment.