~ubuntu-branches/ubuntu/vivid/grass/vivid-proposed

« back to all changes in this revision

Viewing changes to db/db.describe/db.describe.html

  • Committer: Package Import Robot
  • Author(s): Bas Couwenberg
  • Date: 2015-02-20 23:12:08 UTC
  • mfrom: (8.2.6 experimental)
  • Revision ID: package-import@ubuntu.com-20150220231208-1u6qvqm84v430b10
Tags: 7.0.0-1~exp1
* New upstream release.
* Update python-ctypes-ternary.patch to use if/else instead of and/or.
* Drop check4dev patch, rely on upstream check.
* Add build dependency on libpq-dev to grass-dev for libpq-fe.h.
* Drop patches applied upstream, refresh remaining patches.
* Update symlinks for images switched from jpg to png.

Show diffs side-by-side

added added

removed removed

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