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

NAME

6       v.db.addtable   -  Creates  and  adds  a new attribute table to a given
7       layer of an existing vector map.
8

KEYWORDS

10       vector, database, attribute table
11

SYNOPSIS

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,...]]
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 Default: 1
27
28       columns=name type[,name type,...]
29           Name  and type of the new column(s) (types depend on database back‐
30           end, but all support VARCHAR(), INT, DOUBLE and DATE) Default:  cat
31           integer
32

DESCRIPTION

34       v.db.addtable  creates and adds a new attribute table to a given vector
35       map. It links the table to the specified layer of the  vector  map.  If
36       the  vector  map is not yet linked to any table, new a database link is
37       established based on the MAPSET database settings (see db.connect).
38

NOTES

40       v.db.addtable is a front-end to db.execute to allow easier usage.   The
41       supported types of columns depend on the database backend. However, all
42       backends should support VARCHAR, INT, DOUBLE and DATE. The default  dbf
43       backend supports only these types.  The existing database connection(s)
44       can be verified with v.db.connect.
45

EXAMPLE

47       Adding a new attribute table with a single column to default layer 1:
48
49       v.db.addtable sentiero_brenta_points columns="slope double"
50       v.db.connect -p sentiero_brenta_points
51       v.info -c sentiero_brenta_points
52
53
54       Adding a new attribute table with two columns to layer 2:
55
56       v.db.addtable sentiero_brenta_points columns="slope double,myname  var‐
57       char(15)" layer=2
58       v.db.connect -p sentiero_brenta_points
59       v.info -c sentiero_brenta_points
60
61

SEE ALSO

63       db.connect,   db.execute,  v.db.addcol,  v.db.connect,  v.db.droptable,
64       v.db.select, v.db.update
65

AUTHOR

67       Markus Neteler
68
69       Last changed: $Date: 2005/12/10 18:06:10 $
70
71       Full index
72
73
74
75GRASS 6.2.2                                                   v.db.addtable(1)
Impressum