Você está na página 1de 1

select documento,nombre,domicilio,c.

numero,deporte,dia, profesor,matricula
from socios s
join inscriptos i
on s.documento=documentosocio
join cursos c
on c.numero=i.numero;

drop view vista_cursos;

create view vista_cursos


as
select numero,deporte,dia
from cursos;

select *from vista_cursos order by deporte;

insert into vista_cursos values(8,'futbol','martes');


select *from cursos;

update vista_cursos set dia='miercoles' where numero=8;


select *from cursos;

delete from vista_cursos where numero=8;


select *from cursos;

delete from vista_cursos where numero=1;

drop view vista_inscriptos;


create view vista_inscriptos
as
select i.documentosocio,s.nombre,i.numero,c.deporte,dia
from inscriptos i
join socios s
on s.documento=documentosocio
join cursos c
on c.numero=i.numero;

insert into vista_inscriptos values('32222222','Hector


Huerta',6,'futbol','lunes');

update vista_inscriptos set documentosocio='30000111' where


documentosocio='30000000';

delete from vista_inscriptos where documentosocio='30000000' and deporte='tenis';

select *from inscriptos;

Você também pode gostar