I need to know how to do stored procedures in SQL Server for working I have a small database something like this:
use Inventario
create table Clientes (
Nit int,
Nombre char (50),
Direccion char(50),
Telefono int,
primary key (Nit)
);
create table Representante_de_ventas (
Id_vdor int,
Nombre char (50),
Cuota_Vtas int,
primary key (Id_vdor)
);
create table Productos (
Id int,
Descripcion char (50),
Precio int,
primary key (Id)
);
create table Pedido (
Num_pedido int,
Vdor int,
Nit_cliente int,
Fecha_pedido date,
Producto int,
Cantidad int,
primary key (Num_pedido,Nit_cliente,Vdor,Producto),
foreign key (Nit_cliente) references Clientes(Nit),
foreign key (Vdor) references Representante_de_ventas(Id_vdor),
foreign key (Producto) references Productos(Id),
);