description.html 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <h2>DESCRIPTION</h2>
  2. <em>v.db.addtable</em> creates and adds a new attribute table to a given vector
  3. map. It links the table to the specified layer of the vector map. If the vector
  4. map is not yet linked to any table, new a database link is established based on
  5. the MAPSET database settings (see <em>db.connect</em>).
  6. <h2>NOTES</h2>
  7. <em>v.db.addtable</em> is a front-end to <em>db.execute</em> to allow easier
  8. usage.
  9. The supported types of columns depend on the database backend. However, all
  10. backends should support VARCHAR, INT, DOUBLE PRECISION and DATE. The default
  11. dbf backend supports only these types.
  12. The existing database connection(s) can be verified with <em>v.db.connect</em>.
  13. <h2>EXAMPLE</h2>
  14. Adding a new attribute table with a single column to default layer 1:<br>
  15. <div class="code"><pre>
  16. v.db.addtable sentiero_brenta_points columns="slope double precision"
  17. v.db.connect -p sentiero_brenta_points
  18. v.info -c sentiero_brenta_points
  19. </pre></div>
  20. <p>
  21. Adding a new attribute table with two columns to layer 2:<br>
  22. <div class="code"><pre>
  23. v.db.addtable sentiero_brenta_points columns="slope double precision,myname varchar(15)" layer=2
  24. v.db.connect -p sentiero_brenta_points
  25. v.info -c sentiero_brenta_points
  26. </pre></div>
  27. <h2>SEE ALSO</h2>
  28. <em><a HREF="db.connect.html">db.connect</a></em>,
  29. <em><a HREF="db.droptable.html">db.droptable</a></em>,
  30. <em><a HREF="db.execute.html">db.execute</a></em>,
  31. <em><a HREF="v.db.addcol.html">v.db.addcol</a></em>,
  32. <em><a HREF="v.db.connect.html">v.db.connect</a></em>,
  33. <em><a HREF="v.db.dropcol.html">v.db.dropcol</a></em>,
  34. <em><a HREF="v.db.droptable.html">v.db.droptable</a></em>,
  35. <em><a HREF="v.db.select.html">v.db.select</a></em>,
  36. <em><a HREF="v.db.update.html">v.db.update</a></em><br>
  37. <em><a href="sql.html">GRASS SQL interface</a></em>
  38. <h2>AUTHOR</h2>
  39. Markus Neteler
  40. <p>
  41. <i>Last changed: $Date$</i>