<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>GRASS GIS: v.db.addcol</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link rel="stylesheet" href="grassdocs.css" type="text/css"> </head> <body bgcolor="white"> <img src="grass_logo.png" alt="GRASS logo"><hr align=center size=6 noshade> <h2>NAME</h2> <em><b>v.db.addcol</b></em> - Adds one or more columns to the attribute table connected to a given vector map. <h2>KEYWORDS</h2> vector, database, attribute table <h2>SYNOPSIS</h2> <b>v.db.addcol</b><br> <b>v.db.addcol help</b><br> <b>v.db.addcol</b> <b>map</b>=<em>name</em> [<b>layer</b>=<em>integer</em>] <b>columns</b>=<em>string</em> [--<b>verbose</b>] [--<b>quiet</b>] <h3>Parameters:</h3> <DL> <DT><b>map</b>=<em>name</em></DT> <DD>Vector map for which to edit attribute table</DD> <DT><b>layer</b>=<em>integer</em></DT> <DD>Layer where to add column</DD> <DD>Default: <em>1</em></DD> <DT><b>columns</b>=<em>string</em></DT> <DD>Name and type of the new column(s) (types depend on database backend, but all support VARCHAR(), INT, DOUBLE and DATE)</DD> </DL> <h2>DESCRIPTION</h2> <em>v.db.addcol</em> adds one or more column(s) to the attribute table connected to a given vector map. It automatically checks the connection for the specified layer. <h2>NOTES</h2> v.db.addcol is a front-end to <em>db.execute</em> to allow easier usage. The supported types of columns depend on the database backend. However, all backends should support VARCHAR, INT, DOUBLE/REAL and DATE. The default dbf backend supports only these types. The existing database connection(s) can be verified with <em>v.db.connect</em>. <h2>EXAMPLES</h2> Adding a single column:<br> <div class="code"><pre> v.db.addcol sentiero_brenta_points columns="slope double precision" v.info -c sentiero_brenta_points </pre></div> <p> Adding two columns:<br> <div class="code"><pre> v.db.addcol sentiero_brenta_points columns="slope double precision,myname varchar(15)" v.info -c sentiero_brenta_points </pre></div> <h2>SEE ALSO</h2> <em><a HREF="db.execute.html">db.execute</a></em>, <em><a HREF="v.db.addtable.html">v.db.addtable</a></em>, <em><a HREF="v.db.connect.html">v.db.connect</a></em>, <em><a HREF="v.db.dropcol.html">v.db.dropcol</a></em>, <em><a HREF="v.db.droptable.html">v.db.droptable</a></em>, <em><a HREF="v.db.select.html">v.db.select</a></em>, <em><a HREF="v.db.update.html">v.db.update</a></em> <h2>AUTHOR</h2> Moritz Lennert (mlennert@club.worldonline.be) <p><i>Last changed: $Date: 2007-02-05 15:33:02 +0100 (Mon, 05 Feb 2007) $</i> <HR> <P><a href="index.html">Main index</a> - <a href="vector.html">vector index</a> - <a href="full_index.html">Full index</a></P> <P>© 2003-2008 <a href="http://grass.osgeo.org">GRASS Development Team</a></p> </body> </html>