"SELECT * EXCLUDE (id) FROM layer_name"

That worked, thanks!

On Wed, Oct 22, 2025 at 4:30 AM Even Rouault via gdal-dev <
[email protected]> wrote:

>
> If you're in code, you can skip fields using SetIgnoredFields():
>
>
> https://gdal.org/en/stable/doxygen/classOGRLayer.html#aaf3f2e7ee476337082cea814226be11a
>
> SetIgnoredFields() doesn't change the schema. It just tells the driver
> that it doesn't need to fill the fields.
>
>
> For a tool like ogr2ogr, you could try -unsetFid, or build a -fieldmap if
> it isn't too messy.
>
> -unsetFid will not work here because that's a regular field
>
> The following should do: -sql "SELECT * EXCLUDE (id) FROM layer_name"
>
> -- http://www.spatialys.com
> My software is free, but my time generally not.
>
> _______________________________________________
> gdal-dev mailing list
> [email protected]
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>


-- 
Peter Townsend
Senior Software Developer
_______________________________________________
gdal-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to