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

NAME

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

KEYWORDS

10       vector, database, attribute table
11

SYNOPSIS

13       v.db.renamecol
14       v.db.renamecol help
15       v.db.renamecol  map=name   [layer=integer]   column=string[,string,...]
16       [--verbose]  [--quiet]
17
18   Parameters:
19       map=name
20           Vector map for which to rename attribute column
21
22       layer=integer
23           Layer where to rename column
24           Default: 1
25
26       column=string[,string,...]
27           Old and new name of the column (old,new)
28

DESCRIPTION

30       v.db.renamecol  renames  a column in the attribute table connected to a
31       given vector map. It automatically checks the connection for the speci‐
32       fied layer.
33

NOTES

35       If  the  map  table is connected through the DBF or SQLite drivers, the
36       renaming is internally done by adding  a  new  column  with  new  name,
37       transferring the contents of the old column to the new column and drop‐
38       ping the old column. This is needed as DBF or  SQLite  do  not  support
39       "ALTER TABLE" command to rename columns. Due to this the renamed column
40       is found as last column of the table, it's original position cannot  be
41       maintained.
42
43       The SQLite driver will exit with an error if the column rename involves
44       only a change of case, i.e., upper-to-lowercase, or lower-to-uppercase.
45       The  SQLite protocol considers "NAME" and "name" to be identical column
46       names. In cases like these, the user should rename the original  column
47       to  an  intermediary  name,  then  rename the intermediary to the final
48       name.
49

EXAMPLES

51       Renaming a column:
52
53       v.info -c myroads
54       v.db.renamecol myroads column=label,roadtype
55       v.info -c myroads
56
57

SEE ALSO

59       db.execute,  v.db.addcol,  v.db.addtable,  v.db.connect,  v.db.dropcol,
60       v.db.droptable, v.db.select, v.db.update
61

AUTHOR

63       Markus Neteler
64
65       Last changed: $Date: 2008-03-17 15:27:04 +0100 (Mon, 17 Mar 2008) $
66
67       Full index
68
69       © 2003-2008 GRASS Development Team
70
71
72
73GRASS 6.3.0                                                  v.db.renamecol(1)
Impressum