db.describe.html 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <h2>DESCRIPTION</h2>
  2. <em>db.describe</em> displays table information. If parameter <b>-c</b>
  3. is used only column names instead of full column descriptions is given.
  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 and
  7. do not need to be spcified each time.
  8. <h2>EXAMPLES</h2>
  9. <em>List column descriptions of table in SQLite database (note that this
  10. is the default setting)</em><br>
  11. <div class="code"><pre>
  12. db.describe driver=sqlite table=hospitals \
  13. database='$GISDBASE/$LOCATION_NAME/$MAPSET/sqlite/sqlite.db'
  14. # or simply
  15. db.describe myarchsites
  16. </pre></div>
  17. <h3>DBF example</h3>
  18. <div class="code"><pre>
  19. db.describe -c table=hospitals database='$GISDBASE/$LOCATION_NAME/PERMANENT/dbf/' \
  20. driver=dbf
  21. ncols: 16
  22. nrows: 160
  23. Column 1: cat:INTEGER:11
  24. Column 2: OBJECTID:INTEGER:11
  25. Column 3: AREA:DOUBLE PRECISION:20
  26. [...]
  27. </pre></div>
  28. <div class="code"><pre>
  29. db.describe table=hospitals database='$GISDBASE/$LOCATION_NAME/PERMANENT/dbf/' \
  30. driver=dbf
  31. table:hospitals
  32. description:
  33. insert:yes
  34. delete:yes
  35. ncols:16
  36. nrows:160
  37. column:cat
  38. description:
  39. type:INTEGER
  40. len:11
  41. scale:0
  42. precision:10
  43. default:
  44. nullok:yes
  45. select:yes
  46. update:yes
  47. column:OBJECTID
  48. description:
  49. type:INTEGER
  50. [...]
  51. </pre></div>
  52. <h2>SEE ALSO</h2>
  53. <em>
  54. <a href="db.columns.html">db.columns</a>,
  55. <a href="db.droptable.html">db.droptable</a>,
  56. <a href="db.execute.html">db.execute</a>,
  57. <a href="db.login.html">db.login</a>,
  58. <a href="db.tables.html">db.tables</a>,
  59. <a href="sql.html">GRASS SQL interface</a>
  60. </em>
  61. <h2>AUTHOR</h2>
  62. Radim Blazek, ITC-Irst, Trento, Italy
  63. <p><i>Last changed: $Date$</i>