<div dir="ltr"><div>"SELECT * EXCLUDE (id) FROM layer_name"</div><div><br></div>That worked, thanks!</div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Wed, Oct 22, 2025 at 4:30 AM Even Rouault via gdal-dev <<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</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"><u></u>

  
    
  
  <div>
    <br>
    <blockquote type="cite">
      <p style="margin:0px">If
        you're in code, you can skip fields using SetIgnoredFields():</p>
      <p style="margin:0px"><a href="https://gdal.org/en/stable/doxygen/classOGRLayer.html#aaf3f2e7ee476337082cea814226be11a" target="_blank">https://gdal.org/en/stable/doxygen/classOGRLayer.html#aaf3f2e7ee476337082cea814226be11a</a></p>
    </blockquote>
    SetIgnoredFields() doesn't change the schema. It just tells the
    driver that it doesn't need to fill the fields.<br>
    <blockquote type="cite">
      <br>
      <p style="margin:0px">For a
        tool like ogr2ogr, you could try -unsetFid, or build a -fieldmap
        if it isn't too messy.</p>
    </blockquote>
    <p>-unsetFid will not work here because that's a regular field</p>
    <p>The following should do: -sql "SELECT * EXCLUDE (id) FROM
      layer_name"</p>
    <br>
    <pre cols="72">-- 
<a href="http://www.spatialys.com" target="_blank">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
  </div>

_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</blockquote></div><div><br clear="all"></div><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Peter Townsend<br></div>Senior Software Developer<br></div></div>