Está en la página 1de 2

--Create database CompuJM --create table VentayServiciotec (codigoequipo varchar (4), nombreproducto varch ar (50), descripcin varchar (60),

fechaentrega varchar (10),formapago varchar (20 ),cantidad int, costo int, total real) --create table UsuarioCliente (Cedula varchar (8), Nombre varchar (35), Domicili o varchar (60), telefono varchar (12)) --insert into VentayServiciotec values ('001', 'Regulador de Voltaje CDP', 'cdp1 00','15/07/2013','efectivo',1,570,570 ) --Select * from VentayServiciotec --insert into UsuarioCliente values ('20868887','Malvis Sanchez','B Primero de D iciembre casa 322 Barinas','02735326873') --Select * from UsuarioCliente /*Create procedure [Operaciones1] (@code varchar (4), @nomp varchar (50), @des varchar (60), @fech varchar (10), @ formap varchar (20), @cant int, @costo int, @total real, @Op smallint) as begin if @Op=1 begin insert into VentayServiciotec (codigoequipo,nombreproducto,descripcin,fechaentreg a,formapago,cantidad,costo,total) values (@code,@nomp, @des, @fech, @formap, @ca nt, @costo, @total) end if @Op=2 begin update VentayServiciotec set nombreproducto=@nomp, descripcin=@des, cantidad=@can t where codigoequipo=@code end if @Op=3 begin delete from VentayServiciotec where codigoequipo=@code end end*/ --Operaciones1 '002', 'Mesa de Computadora','3/N','14/07/2013','Tarjeta Credito' ,2,940,1880,2 --Select * From VentayServiciotec /*Create procedure [Operaciones2] (@cedu varchar (8), @nom varchar (35), @dom varchar (60), @tele varchar (12), @O p smallint) as begin if @Op=1 begin insert into UsuarioCliente (cedula,nombre,domicilio, telefono) values (@cedu, @n om, @dom, @tele) end if @Op=2 begin update UsuarioCliente set nombre=@nom, domicilio=@dom where Cedula=@cedu end if @Op=3 begin delete from UsuarioCliente where cedula=@cedu

end end*/ --Operaciones2 '25645936', 'Julio Pantoja','Urb Andres Bello Manzana O Casa 1',' 04266288626',2 --Select * From UsuarioCliente

También podría gustarte