Skip to main content
2 of 3
thanks
lynxlynxlynx
  • 4.3k
  • 3
  • 31
  • 46

I think you're looking for this:

create tableC as 
  (select st_intersection(a.geom, b.geom) as geom, a.name as name 
   from tableA as a, tableB as b
   where st_intersects(a.geom, b.geom));

By looking at each intersection separately, you can access all the included data.

lynxlynxlynx
  • 4.3k
  • 3
  • 31
  • 46