-- View: vu_sites_niv2_typo

-- DROP VIEW vu_sites_niv2_typo;

CREATE OR REPLACE VIEW vu_sites_niv2_typo AS 
 SELECT sites.code_site, sites.libl_site, sites.ref_typ_spe, sit_typologie.type_site
   FROM sites
   JOIN sit_typologie ON sites.ref_typ_spe = sit_typologie.id_site_spe_typ
  WHERE sites.ref_typ_spe <> 5;

ALTER TABLE vu_sites_niv2_typo OWNER TO postgres;
GRANT ALL ON TABLE vu_sites_niv2_typo TO postgres;
GRANT SELECT, REFERENCES, TRIGGER ON TABLE vu_sites_niv2_typo TO cpnrc;
