1v.db.addcolumn(1)             Grass User's Manual            v.db.addcolumn(1)
2
3
4

NAME

6       v.db.addcolumn   - Adds one or more columns to the attribute table con‐
7       nected to a given vector map.
8

KEYWORDS

10       vector, attribute table, database
11

SYNOPSIS

13       v.db.addcolumn
14       v.db.addcolumn --help
15       v.db.addcolumn  map=name    [layer=string]    columns=name   type[,name
16       type,...]  [--help]  [--verbose]  [--quiet]  [--ui]
17
18   Flags:
19       --help
20           Print usage summary
21
22       --verbose
23           Verbose module output
24
25       --quiet
26           Quiet module output
27
28       --ui
29           Force launching GUI dialog
30
31   Parameters:
32       map=name [required]
33           Name of vector map
34           Or data source for direct OGR access
35
36       layer=string
37           Layer number where to add column(s)
38           Vector  features can have category values in different layers. This
39           number determines which layer to use. When  used  with  direct  OGR
40           access this is the layer name.
41           Default: 1
42
43       columns=name type[,name type,...] [required]
44           Name and type of the new column(s) (’name type [,name type, ...]’)
45           Types  depend  on database backend, but all support VARCHAR(), INT,
46           DOUBLE PRECISION and  DATE.  Example:  ’label  varchar(250),  value
47           integer’
48

DESCRIPTION

50       v.db.addcolumn  adds  one or more column(s) to the attribute table con‐
51       nected to a given vector map. It automatically  checks  the  connection
52       for the specified layer.
53

NOTES

55       v.db.addcolumn is a front-end to db.execute to allow easier usage.  The
56       supported types of columns depend on the database backend. However, all
57       backends should support VARCHAR, INT, DOUBLE PRECISION and DATE.
58
59       The existing database connection(s) can be verified with v.db.connect.
60

EXAMPLES

62       Adding a single column:
63       g.copy vect=roadsmajor,myroads
64       v.db.addcolumn myroads columns="slope double precision"
65       v.info -c myroads
66
67       Adding two columns:
68       g.copy vect=roadsmajor,myroads
69       v.db.addcolumn myroads columns="slope double precision,myname varchar(15)"
70       v.info -c myroads
71

SEE ALSO

73         db.connect, db.execute, v.db.addtable, v.db.connect, v.db.dropcolumn,
74       v.db.droptable, v.db.select, v.db.update
75       GRASS SQL interface
76

AUTHOR

78       Moritz Lennert (mlennert@club.worldonline.be)
79

SOURCE CODE

81       Available at: v.db.addcolumn source code (history)
82
83       Main index | Vector index | Topics index | Keywords index  |  Graphical
84       index | Full index
85
86       © 2003-2019 GRASS Development Team, GRASS GIS 7.8.2 Reference Manual
87
88
89
90GRASS 7.8.2                                                  v.db.addcolumn(1)
Impressum