db.dropcolumn.1grass man page

db.dropcolumn — Drops a column from selected attribute table.

Keywords

database, attribute table

Synopsis

db.dropcolumn
db.dropcolumn --help
db.dropcolumn [-f] table=name column=name [--help] [--verbose] [--quiet] [--ui]

Flags

-f
Force removal (required for actual deletion of files)
--help
Print usage summary
--verbose
Verbose module output
--quiet
Quiet module output
--ui
Force launching GUI dialog

Parameters

table=name [required]
Name of attribute table
column=name [required]
Name of attribute column

Description

db.dropcolumn drops a column from 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.

Notes

db.dropcolumn is a front-end to db.execute to allow easier usage with a special workaround for the SQLite driver to support column drop also for SQLite tables.

Example

Dropping a column (North Carolina sample dataset):

# work on own copy
g.copy vect=roadsmajor,myroads
db.describe -c myroads
# only shows what would happen:
db.dropcolumn myroads column=SHAPE_LEN
# actually drops the column
db.dropcolumn -f myroads column=SHAPE_LEN
db.describe -c myroads

See Also

db.describe, db.droptable, db.execute, v.db.dropcolumn, GRASS SQL interface

Author

Markus Neteler

Last changed: $Date: 2011-11-08 13:24:20 -0800 (Tue, 08 Nov 2011) $

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

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

Info

GRASS 7.0.4 Grass User's Manual