db.droptable.1grass man page

db.droptable — Drops an attribute table.


database, attribute table


db.droptable --help
db.droptable [-f]  [driver=name]   [database=name]  table=name  [--help]  [--verbose]  [--quiet]  [--ui]



Force removal (required for actual deletion of files)


Print usage summary


Verbose module output


Quiet module output


Force launching GUI dialog



Name of database driver
If not given then default driver is used


Name of database
If not given then default database is used

table=name [required]

Name of table to drop


db.droptable drops an attribute table.  If the -f force flag is not given then nothing is removed, instead a preview of the action to be taken is printed.


db.droptable is a front-end to db.execute to allow easier usage. To some extent it is verified if the table is connected to a vector map to avoid accidential table removal.


Removing an attribute table from default database

# 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

Removing an attribute table from given database

db.droptable allows defining optionally driver and database options different from default connection settings (db.connect -p).

# drop the table from SQLite database
db.droptable -f table=sometable driver=sqlite database=/opt/sqlite.db

See Also

db.dropdb, db.dropcolumn, db.execute, db.login, db.connect, db.tables, db.describe, v.db.droptable,

GRASS SQL interface


Markus Neteler
Driver and database options added by Martin Landa, Czech Technical University in Prague, Czech Republic

Last changed: $Date: 2015-02-13 16:16:22 +0100 (Fri, 13 Feb 2015) $

Main index | Database index | Topics index | Keywords index | Full index

© 2003-2016 GRASS Development Team, GRASS GIS 7.0.4 Reference Manual


GRASS 7.0.4 Grass User's Manual