db.columns.html 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <h2>DESCRIPTION</h2>
  2. <em>db.columns</em> lists all columns for a give table. Connection to
  3. databases are supported through dbf, shp, odbc and pg drivers.
  4. <h2>NOTE</h2>
  5. If parameters for database connection are already set with
  6. <a href="db.connect.html">db.connect</a>, they are taken as default values
  7. and do not need to be spcified each time.
  8. <h2>EXAMPLES</h2>
  9. <h3>List columns of a PostgreSQL attribute table</h3>
  10. <div class="code"><pre>
  11. db.columns table=zipcodes_wake driver=pg database=grassdb
  12. </pre></div>
  13. <p>
  14. <em>If the database parameters are already set, the columns can be listed
  15. directly</em><br>
  16. <div class="code"><pre>
  17. db.columns table=zipcodes_wake
  18. </pre></div>
  19. <h3>List columns from Shape file with DBF attribute table</h3>
  20. <div class="code"><pre>
  21. db.columns table=zipcodes_wake driver=dbf database=/grassdata/nc_spm_08/PERMANENT/dbf/
  22. </pre></div>
  23. <h3>List columns of table in SQLite database</h3>
  24. Note that the SQLite backend is the default setting.
  25. <div class="code"><pre>
  26. db.columns driver=sqlite table=archsites database='$GISDBASE/$LOCATION_NAME/$MAPSET/sqlite/sqlite.db'
  27. </pre></div>
  28. <h2>SEE ALSO</h2>
  29. <em>
  30. <a href="db.connect.html">db.connect</a>,
  31. <a href="db.describe.html">db.describe</a>,
  32. <a href="db.drivers.html">db.drivers</a>,
  33. <a href="db.droptable.html">db.droptable</a>,
  34. <a href="db.execute.html">db.execute</a>,
  35. <a href="db.login.html">db.login</a>,
  36. <a href="db.tables.html">db.tables</a>,
  37. <a href="sql.html">GRASS SQL interface</a>
  38. </em>
  39. <p>
  40. <a href="sql.html">GRASS SQL interface</a>
  41. <h2>AUTHOR</h2>
  42. Radim Blazek, ITC-Irst, Trento, Italy
  43. <p><i>Last changed: $Date$</i>