/* common DB에 있는 source date file 확인 */ select * from common.dbo.ebhPhoto select * from common.dbo.ebhAddress select * from common.dbo.ebhPano select * from common.dbo.ebhHeritage select * from common.dbo.ebhDomain /* source date file을 자신의 데이터베이스로 copy */ select * into ebhPhoto from common.dbo.ebhPhoto select * into ebhAddress from common.dbo.ebhAddress select * into ebhPano from common.dbo.ebhPano select * into ebhHeritage from common.dbo.ebhHeritage select * into ebhDomain from common.dbo.ebhDomain /* 자기 DB에 있는 date file 확인 */ select * from ebhPhoto select * from ebhAddress select * from ebhPano select * from ebhHeritage select * from ebhDomain /* 가상 테이블 (view) 생성 */ -- Photo Menu create view ebhPhotoMenu as select province, site, domain, domainType, count(*) as pics from ebhPhoto group by province, domainType, domain, site create view ebhPhotoMenu as select province, site, domain, domainType, count(*) as pics from ebhPhoto group by province, domainType, domain, site select * from ebhPhotoMenu -- Geo select id, class, label, latitude, longitude, infoUrl, vrUrl, iconUrl from ebhDomain left join ebhPano on ebhDomain.id = ebhPano.domain create view ebhGeo as select id, class, label, latitude, longitude, infoUrl, vrUrl, iconUrl from ebhDomain left join ebhPano on ebhDomain.id = ebhPano.domain select * from ebhGeo