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

I think you're looking for this:

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

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

lynxlynxlynx
  • 4.3k
  • 3
  • 31
  • 46