db.dropcolumn.html 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <h2>DESCRIPTION</h2>
  2. <em>db.dropcolumn</em> drops a column from an attribute table.
  3. If the <b>-f</b> force flag is not given then nothing is removed, instead
  4. a preview of the action to be taken is printed.
  5. <h2>NOTES</h2>
  6. <em>db.dropcolumn</em> is a front-end to <em>db.execute</em> to allow easier
  7. usage with a special workaround for the SQLite driver to support column
  8. drop also for SQLite tables.
  9. <h2>EXAMPLE</h2>
  10. Dropping a column (North Carolina sample dataset):
  11. <p><div class="code"><pre>
  12. # work on own copy
  13. g.copy vect=roadsmajor,myroads
  14. db.describe -c myroads
  15. # only shows what would happen:
  16. db.dropcolumn myroads column=SHAPE_LEN
  17. # actually drops the column
  18. db.dropcolumn -f myroads column=SHAPE_LEN
  19. db.describe -c myroads
  20. </pre></div>
  21. <h2>SEE ALSO</h2>
  22. <em>
  23. <a href="db.describe.html">db.describe</a>,
  24. <a href="db.droptable.html">db.droptable</a>,
  25. <a href="db.execute.html">db.execute</a>,
  26. <a href="v.db.dropcolumn.html">v.db.dropcolumn</a>,
  27. <a href="sql.html">GRASS SQL interface</a>
  28. </em>
  29. <h2>AUTHOR</h2>
  30. Markus Neteler
  31. <p><i>Last changed: $Date$</i>