.TH v.db.addcolumn 1grass "" "GRASS 7.8.5" "GRASS GIS User's Manual" .SH NAME \fI\fBv.db.addcolumn\fR\fR \- Adds one or more columns to the attribute table connected to a given vector map. .SH KEYWORDS vector, attribute table, database .SH SYNOPSIS \fBv.db.addcolumn\fR .br \fBv.db.addcolumn \-\-help\fR .br \fBv.db.addcolumn\fR \fBmap\fR=\fIname\fR [\fBlayer\fR=\fIstring\fR] \fBcolumns\fR=\fIname type\fR[,\fIname type\fR,...] [\-\-\fBhelp\fR] [\-\-\fBverbose\fR] [\-\-\fBquiet\fR] [\-\-\fBui\fR] .SS Flags: .IP "\fB\-\-help\fR" 4m .br Print usage summary .IP "\fB\-\-verbose\fR" 4m .br Verbose module output .IP "\fB\-\-quiet\fR" 4m .br Quiet module output .IP "\fB\-\-ui\fR" 4m .br Force launching GUI dialog .SS Parameters: .IP "\fBmap\fR=\fIname\fR \fB[required]\fR" 4m .br Name of vector map .br Or data source for direct OGR access .IP "\fBlayer\fR=\fIstring\fR" 4m .br Layer number where to add column(s) .br Vector features can have category values in different layers. This number determines which layer to use. When used with direct OGR access this is the layer name. .br Default: \fI1\fR .IP "\fBcolumns\fR=\fIname type[,\fIname type\fR,...]\fR \fB[required]\fR" 4m .br Name and type of the new column(s) (\(cqname type [,name type, ...]\(cq) .br Types depend on database backend, but all support VARCHAR(), INT, DOUBLE PRECISION and DATE. Example: \(cqlabel varchar(250), value integer\(cq .SH DESCRIPTION \fIv.db.addcolumn\fR 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. .SH NOTES \fIv.db.addcolumn\fR is a front\-end to \fIdb.execute\fR 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. .PP The existing database connection(s) can be verified with \fIv.db.connect\fR. .SH EXAMPLES Adding a single column: .br .br .nf \fC g.copy vect=roadsmajor,myroads v.db.addcolumn myroads columns=\(dqslope double precision\(dq v.info \-c myroads \fR .fi .PP Adding two columns: .br .br .nf \fC g.copy vect=roadsmajor,myroads v.db.addcolumn myroads columns=\(dqslope double precision,myname varchar(15)\(dq v.info \-c myroads \fR .fi .SH SEE ALSO \fI db.connect, db.execute, v.db.addtable, v.db.connect, v.db.dropcolumn, v.db.droptable, v.db.select, v.db.update .br GRASS SQL interface \fR .SH AUTHOR Moritz Lennert (mlennert@club.worldonline.be) .SH SOURCE CODE .PP Available at: v.db.addcolumn source code (history) .PP Main index | Vector index | Topics index | Keywords index | Graphical index | Full index .PP © 2003\-2020 GRASS Development Team, GRASS GIS 7.8.5 Reference Manual