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

NAME

6       v.db.renamecolumn   - Renames a column in the attribute table connected
7       to a given vector map.
8

KEYWORDS

10       vector, attribute table, database, rename
11

SYNOPSIS

13       v.db.renamecolumn
14       v.db.renamecolumn --help
15       v.db.renamecolumn   map=name    [layer=string]     column=oldcol,newcol
16       [--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 or name
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       column=oldcol,newcol [required]
44           Old and new name of the column (old,new)
45

DESCRIPTION

47       v.db.renamecolumn  renames a column in the attribute table connected to
48       a given vector map. It automatically  checks  the  connection  for  the
49       specified layer.
50

NOTES

52       If  the  map  table is connected through the DBF or SQLite drivers, the
53       renaming is internally done by adding  a  new  column  with  new  name,
54       transferring the contents of the old column to the new column and drop‐
55       ping the old column. This is needed as DBF or  SQLite  do  not  support
56       "ALTER TABLE" command to rename columns. Due to this the renamed column
57       is found as last column of the table, it’s original position cannot  be
58       maintained.
59
60       The SQLite driver will exit with an error if the column rename involves
61       only a change of case, i.e., upper-to-lowercase, or lower-to-uppercase.
62       The  SQLite protocol considers "NAME" and "name" to be identical column
63       names. In cases like these, the user should rename the original  column
64       to  an  intermediary  name,  then  rename the intermediary to the final
65       name.
66

EXAMPLES

68       Renaming a column:
69       g.copy vect=roadsmajor,myroads
70       v.info -c myroads
71       v.db.renamecolumn myroads column=ROAD_NAME,roadname
72       v.info -c myroads
73

SEE ALSO

75        db.execute, v.db.addcolumn, v.db.addtable, v.db.connect, v.db.dropcol‐
76       umn, v.db.droptable, v.db.select, v.db.update
77       GRASS SQL interface
78

AUTHOR

80       Markus Neteler
81
82       Last changed: $Date: 2011-11-08 22:24:20 +0100 (Tue, 08 Nov 2011) $
83

SOURCE CODE

85       Available at: v.db.renamecolumn source code (history)
86
87       Main  index  | Vector index | Topics index | Keywords index | Graphical
88       index | Full index
89
90       © 2003-2019 GRASS Development Team, GRASS GIS 7.4.4 Reference Manual
91
92
93
94GRASS 7.4.4                                               v.db.renamecolumn(1)
Impressum