Está en la página 1de 1

**PROCEDIMIENTO PARA INSERTAR DATOS EN SQL***** create proc insertproduct (@Id_producto int, @Nom_producto nchar(20)) as begin insert into

Productos (Id_producto , Nom_producto) values (@Id_producto, @Nom_producto) end ***PROCEDIMEINTO PARA MOSTRAR TODOS LOS DATOS*** create proc mostprod as begin select * from Productos end **PROCEDIMIENTO PARA ELIMINAR DATOS EN SQL***** create procedure eliminar (@filtro as int) as begin delete from Productos where Id_producto = @filtro end **PROCEDIMIENTO PARA MODIFICAR DATOS EN SQL***** create procedure modificar (@filtro as int, @nom nchar(20)) as begin update Productos set Nom_producto=@nom where Id_producto=@filtro end *PROCEDIMIENTO PARA MOSTRAR DATOS CON PARAMETROS EN SQL***** CREATE PROCEDURE mostraparametros @codigo int AS BEGIN select * from productos where pro_cod = @codigo

También podría gustarte