<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<br>
<blockquote type="cite" cite="mid:5061095.31r3eYUQgx@audax">
<p
style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">If
you're in code, you can skip fields using SetIgnoredFields():</p>
<p
style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;"><a
href="https://gdal.org/en/stable/doxygen/classOGRLayer.html#aaf3f2e7ee476337082cea814226be11a"
moz-do-not-send="true" class="moz-txt-link-freetext">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" cite="mid:5061095.31r3eYUQgx@audax">
<br>
<p
style="margin-top:0;margin-bottom:0;margin-left:0;margin-right:0;">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 class="moz-signature" cols="72">--
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</body>
</html>