1v.db.addcolumn(1)           GRASS GIS 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 ac‐
40           cess 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  in‐
47           teger’
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
76        GRASS SQL interface
77

AUTHOR

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

SOURCE CODE

82       Available at: v.db.addcolumn source code (history)
83
84       Accessed: Saturday Jan 21 21:17:03 2023
85
86       Main index | Vector index | Topics index | Keywords index  |  Graphical
87       index | Full index
88
89       © 2003-2023 GRASS Development Team, GRASS GIS 8.2.1 Reference Manual
90
91
92
93GRASS 8.2.1                                                  v.db.addcolumn(1)
Impressum