Make your own free website on Tripod.com
Creación de Vistas

use northwind
go
select * from sysobjects where type='u'
go
select * from sysobjects where type='p'
go
select * from orders
go
select orderid, customerid, employeeid, orderdate from orders
go
select * from customers
go
select * from employees
go
create view v_ordenes(orden,empresa,empleado,fecha_orden)
as

select o.orderid as orden, c.companyname as empresa, e.lastname +','+ e.firstname as empleado, o.orderdate as [fecha de orden]

from (orders o inner join customers c
on o.customerid=c.customerid)
inner join employees e
on o.employeeid=e.employeeid
go
select* from v_ordenes
go
select * from v_ordenes order by empresa,empleado
go
select * from v_ordenes order by empresa,empleado


REGRESAR

©Copyright Derechos Reservados
Lizett Angel Torres
AV.Los Paujiles 138
Lima-Perú