Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use mydb;
- DELIMITER //
- CREATE PROCEDURE ModStock (IN name VARCHAR(20), IN cant INT)
- BEGIN
- DECLARE aux INT;
- SET aux =
- ( select idProducto
- from productos
- where Nombre = name
- );
- UPDATE productos
- SET Stock = cant
- WHERE idProducto = aux;
- END; //
Advertisement
Add Comment
Please, Sign In to add comment