v.db.dropcolumn(1)
π v.db.dropcolumn β bestie, let's delete a whole column π
okay so real talk, this is v.db.dropcolumn from the GRASS GIS User's Manual, and it is exactly what it sounds like: it drops a column from the attribute table connected to a given vector map. that's it. that's the whole vibe. β¨
πΈ KEYWORDS πΈ
vector, attribute table, database
π SYNOPSIS π
v.db.dropcolumn
v.db.dropcolumn --help
v.db.dropcolumn map=name [layer=string] columns=name[,name,...]
[--help] [--verbose] [--quiet] [--ui]
β¨ Flags β¨
--helpβ prints the usage summary, aka the "what do i even type" rescue button π«Ά--verboseβ verbose module output, she's chatty π¬--quietβ quiet module output, she's mysterious π€«--uiβ force launching the GUI dialog, for when you want the pretty window π
β¨ Parameters β¨
map=name[required] β the name of the vector map. Or, plot twist, it can be the data source for direct OGR access. πlayer=stringβ the layer number or name. so here's the tea: vector features can have category values in different layers, and this number is what determines which layer to use. when you're using it with direct OGR access, this is the layer name instead. Default:1columns=name[,name,...][required] β the name of the attribute column(s) to drop. you can drop several at once, comma-separated, no cap π
π¦ DESCRIPTION π¦
v.db.dropcolumn drops a column from the attribute table connected to a given vector map. she automatically checks the connection for the specified layer β like, she's not gonna just yolo it, she checks first, main character energy fr.
and here's the important bit bestie: v.db.dropcolumn omits to delete the 'cat' column, because that one is relevant to keep the connection between the vector map and the table. so like, do not come for cat. she's staying. periodt. π₯
π NOTES π
v.db.dropcolumn is a front-end to db.execute β it exists to allow easier usage. she's the friendly lil interface, the db.execute underneath is doing the actual lifting. π
the existing database connection(s) can be verified with v.db.connect. so if you're like "wait, what am i even connected to" β that's your girl.
π EXAMPLES π
Dropping a column:
g.copy vect=roadsmajor,myroads
v.info -c myroads
v.db.dropcolumn myroads column=SHAPE_LEN
v.info -c myroads
(and yes, that example line literally says column=SHAPE_LEN β presenting it verbatim, exactly as the manual wrote it, because the facts do not change even when the vibe does π
)
π§ SEE ALSO π§
db.connect, db.dropcolumn, db.execute, v.db.addcolumn, v.db.connect, v.db.droptable, v.db.select, v.db.update
GRASS SQL interface
π AUTHOR π
Markus Neteler
π SOURCE CODE π
Available at: v.db.dropcolumn source code (history)
Accessed: Saturday Jan 17 05:41:52 2026
Main index | Vector index | Topics index | Keywords index | Graphical index | Full index
Β© 2003-2025 GRASS Development Team, GRASS GIS 8.4.2 Reference Manual
okay that's the whole page bestie, mwah π this was GRASS 8.4.2, page v.db.dropcolumn(1) β go forth and drop columns responsibly, and remember: cat stays. π±ππ¦
π¦ where this page comes from
- fedora 44: grass 8.4.2-4.fc44 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms