v.db.dropcolumn(1grass)

🌸 v.db.dropcolumn πŸ’…

okay bestie, welcome to v.db.dropcolumn, straight out of the GRASS User's Manual ✨ this little icon drops a column from the attribute table that's connected to a given vector map. yes. that's the whole job. it's giving "minimalist queen" and we love her for it 🫢


✨ NAME ✨

v.db.dropcolumn β€” drops a column from the attribute table connected to a given vector map πŸ’–


πŸ”‘ 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 β€” print usage summary. the "what am i even doing here" button πŸ™ˆ
  • --verbose β€” verbose module output. she talks more πŸ’¬
  • --quiet β€” quiet module output. she talks less 🀫
  • --ui β€” force launching GUI dialog. graphical main character energy πŸ‘‘

🌸 Parameters:

  • map=name [required] β€” name of vector map. or, plot twist, the data source for direct OGR access πŸ’«
  • layer=string β€” layer number or name. so like, vector features can have category values in different layers, and this number decides which layer we're using. when you're doing direct OGR access, this is the layer name instead. Default: 1
  • columns=name[,name,...] [required] β€” name of attribute column(s) to drop πŸ—‘οΈ

πŸ’– 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 a diligent bestie doing a vibe check first ✨

and here's the thing β€” 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. do not touch the 'cat'. the 'cat' is sacred. it's the group chat admin πŸ±πŸ‘‘


πŸ“ NOTES πŸ“

v.db.dropcolumn is a front-end to db.execute, existing purely to allow easier usage. she's the friendly face on top of the machinery πŸ’…

also!! the existing database connection(s) can be verified with v.db.connect. go check before you go dropping, bestie 🫢

πŸ“ EXAMPLES πŸ“

Dropping a column:

g.copy vect=roadsmajor,myroads
v.info -c myroads
v.db.dropcolumn myroads column=SHAPE_LEN
v.info -c myroads

(yes, the example passes column= singular β€” we keep it exactly as written, no cap 🧚)


πŸ‘€ 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)

Latest change: Monday Feb 10 14:42:02 2025 in commit: 5fe1b99fd164594d032568b67f0543be3bd67766

Main index | Vector index | Topics index | Keywords index | Graphical index | Full index


and that's the whole page, bestie!! πŸŽ€ we did it, we read the entire manual, ate and left no crumbs πŸ’…

Β© 2003-2026 GRASS Development Team, GRASS 8.5.0 Reference Manual β€” and this served from GRASS 8.5.0, literally iconic, periodt βœ¨πŸ¦‹πŸŒ·

kisses, stay connected (database-wise) πŸ’œ

πŸ“¦ where this page comes from