db.droptable.html 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <h2>DESCRIPTION</h2>
  2. <em>db.droptable</em> drops an attribute table. If the <b>-f</b>
  3. force flag is not given then nothing is removed, instead a preview of
  4. the action to be taken is printed.
  5. <h2>NOTES</h2>
  6. <em>db.droptable</em> is a front-end
  7. to <em><a href="db.execute.html">db.execute</a></em> to allow easier
  8. usage. To some extent it is verified if the table is connected to a
  9. vector map to avoid accidental table removal.
  10. <h2>EXAMPLES</h2>
  11. <h3>Removing an attribute table from default database</h3>
  12. <div class="code"><pre>
  13. # show default database
  14. db.connect -p
  15. # show available tables
  16. db.tables -p
  17. # this will show what would happen
  18. db.droptable table=sometable
  19. # actually drop the table
  20. db.droptable -f table=sometable
  21. </pre></div>
  22. <h3>Removing an attribute table from given database</h3>
  23. <em>db.droptable</em> allows defining optionally <b>driver</b>
  24. and <b>database</b> options different from default connection settings
  25. (<tt>db.connect -p</tt>).
  26. <div class="code"><pre>
  27. # drop the table from SQLite database
  28. db.droptable -f table=sometable driver=sqlite database=/opt/sqlite.db
  29. </pre></div>
  30. <h2>SEE ALSO</h2>
  31. <em>
  32. <a href="db.dropdb.html">db.dropdb</a>,
  33. <a href="db.dropcolumn.html">db.dropcolumn</a>,
  34. <a href="db.execute.html">db.execute</a>,
  35. <a href="db.login.html">db.login</a>,
  36. <a href="db.connect.html">db.connect</a>,
  37. <a href="db.tables.html">db.tables</a>,
  38. <a href="db.describe.html">db.describe</a>,
  39. <a href="v.db.droptable.html">v.db.droptable</a>,
  40. </em>
  41. <p>
  42. <a href="sql.html">GRASS SQL interface</a>
  43. <h2>AUTHORS</h2>
  44. Markus Neteler<br>
  45. Driver and database options added by Martin Landa, Czech Technical University in Prague, Czech Republic
  46. <p>
  47. <i>Last changed: $Date$</i>