<div dir="ltr">Hello, <div><br></div><div>Yes you can by creating a view using UNION ALL (or UNION if you want to filter out duplicate lines) between tables you want to use, for instance:</div><div><br></div><div><pre style="margin-top:0px;margin-bottom:0px;padding:0px;list-style:none;font-size:1.2em;color:rgb(51,51,51)">create or replace view myview as 
   select suivi_dossier as suivi_dossier, commune as commune, geom from table1 UNION ALL
   select suividossier, comm, geom from table2 UNION ALL
   select ... from table3;</pre><pre style="margin-top:0px;margin-bottom:0px;padding:0px;list-style:none;font-size:1.2em;color:rgb(51,51,51)"><br></pre><pre style="margin-top:0px;margin-bottom:0px;padding:0px;list-style:none;font-size:1.2em;color:rgb(51,51,51)"><span style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:small">Each select must define the same number and type of columns, first select gives column names for the view.</span></pre><pre style="margin-top:0px;margin-bottom:0px;padding:0px;list-style:none;font-size:1.2em;color:rgb(51,51,51)"><span style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:small">(OpenJump is a GIS software that can display such views/tables containing heterogeneous geometry types, as QGIS does not like them)</span></pre><font color="#888888"><pre style="margin-top:0px;margin-bottom:0px;padding:0px;list-style:none;font-size:1.2em;color:rgb(51,51,51)"><span style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:small"><br></span></pre><pre style="margin-top:0px;margin-bottom:0px;padding:0px;list-style:none;font-size:1.2em;color:rgb(51,51,51)"><span style="color:rgb(34,34,34);font-family:Arial,Helvetica,sans-serif;font-size:small">Nicolas</span></pre></font></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 23 Aug 2023 at 11:31, celati Laurent <<a href="mailto:laurent.celati@gmail.com">laurent.celati@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Good morning,<br><br>I have 5 postgis tables which have different types of geometries (1 point, 1 linear, 3 polygon). And also different field structures. These tables share fields that provide the same information (project_monitoring, municipality, etc.). Although the name of these fields is not always identical according to the tables.<br><br>I would like to be able to create a view that can retrieve a few fields from these tables: the geom, the values of municipalities, the monitoring_scope  Do you know how I can do?<br><div><br></div><div>Thanks a lot.</div></div>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/postgis-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-users</a><br>
</blockquote></div>