NAME
v.db.addcolumn - Adds one or more columns to the attribute table connected to a given vector map.
KEYWORDS
vector, database, attribute table
SYNOPSIS
v.db.addcolumn
v.db.addcolumn help
v.db.addcolumn map=name [layer=integer] columns=string [--verbose] [--quiet]
Parameters:
- map=name
- Name of vector map for which to edit attribute table
- layer=integer
- Layer number where to add column(s)
- A single vector map can be connected to multiple database tables. This number determines which table to use.
- Default: 1
- columns=string
- Name and type of the new column(s) ('name type [,name type, ...]')
- Data types depend on database backend, but all support VARCHAR(), INT, DOUBLE PRECISION and DATE
DESCRIPTION
v.db.addcolumn adds one or more column(s) to the attribute table
connected to a given vector map. It automatically checks the connection for the
specified layer.
NOTES
v.db.addcolumn is a front-end to db.execute to allow easier usage.
The supported types of columns depend on the database backend. However, all
backends should support VARCHAR, INT, DOUBLE PRECISION and DATE. The default
dbf backend supports only these types.
The existing database connection(s) can be verified with v.db.connect.
EXAMPLES
Adding a single column:
v.db.addcolumn sentiero_brenta_points columns="slope double precision"
v.info -c sentiero_brenta_points
Adding two columns:
v.db.addcolumn sentiero_brenta_points columns="slope double precision,myname varchar(15)"
v.info -c sentiero_brenta_points
SEE ALSO
db.execute,
v.db.addtable,
v.db.connect,
v.db.dropcolumn,
v.db.droptable,
v.db.select,
v.db.update,
GRASS SQL interface
AUTHOR
Moritz Lennert (mlennert@club.worldonline.be)
Last changed: $Date: 2010-03-21 09:20:56 -0800 (Sun, 21 Mar 2010) $
Main index - vector index - Full index
© 2003-2011 GRASS Development Team