-- View: vu_sites_statuts

-- DROP VIEW vu_sites_statuts;

CREATE OR REPLACE VIEW vu_sites_statuts AS 
 SELECT sites.objectid, sites.code_site, sites.libl_site, sites.code_ensemble, sites.site_ln, sites.codesite_zabou, sites.ref_statut, sit_liste_statut.id_statut, sit_liste_statut.ordre, sit_liste_statut.statut
   FROM sites
   JOIN sit_liste_statut ON sites.ref_statut = sit_liste_statut.id_statut;

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


