1v.db.addtable(1) Grass User's Manual v.db.addtable(1)
2
3
4
6 v.db.addtable - Creates and adds a new attribute table to a given
7 layer of an existing vector map.
8
10 vector, database, attribute table
11
13 v.db.addtable
14 v.db.addtable help
15 v.db.addtable map=name [table=string] [layer=integer] [col‐
16 umns=name type[,name type,...]] [--verbose] [--quiet]
17
18 Parameters:
19 map=name
20 Vector map for which to add new attribute table
21
22 table=string
23 Name of new attribute table (default: vector map name)
24
25 layer=integer
26 Layer where to add new attribute table
27 Default: 1
28
29 columns=name type[,name type,...]
30 Name and type of the new column(s) (types depend on database back‐
31 end, but all support VARCHAR(), INT, DOUBLE and DATE)
32 Default: cat integer
33
35 v.db.addtable creates and adds a new attribute table to a given vector
36 map. It links the table to the specified layer of the vector map. If
37 the vector map is not yet linked to any table, new a database link is
38 established based on the MAPSET database settings (see db.connect).
39
41 v.db.addtable is a front-end to db.execute to allow easier usage. The
42 supported types of columns depend on the database backend. However, all
43 backends should support VARCHAR, INT, DOUBLE and DATE. The default dbf
44 backend supports only these types. The existing database connection(s)
45 can be verified with v.db.connect.
46
48 Adding a new attribute table with a single column to default layer 1:
49
50 v.db.addtable sentiero_brenta_points columns="slope double"
51 v.db.connect -p sentiero_brenta_points
52 v.info -c sentiero_brenta_points
53
54
55 Adding a new attribute table with two columns to layer 2:
56
57 v.db.addtable sentiero_brenta_points columns="slope double,myname var‐
58 char(15)" layer=2
59 v.db.connect -p sentiero_brenta_points
60 v.info -c sentiero_brenta_points
61
62
64 db.connect, db.execute, v.db.addcol, v.db.connect, v.db.dropcol,
65 v.db.droptable, v.db.select, v.db.update
66 GRASS SQL interface
67
69 Markus Neteler
70
71 Last changed: $Date: 2007-05-07 17:59:55 +0200 (Mon, 07 May 2007) $
72
73 Full index
74
75 © 2003-2008 GRASS Development Team
76
77
78
79GRASS 6.3.0 v.db.addtable(1)