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: 1
  • columns=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