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