v.db.droptable(1grass)
π v.db.droptable β the GRASS manual page, bestie edition
okay so you're reading v.db.droptable(1grass) from the GRASS User's Manual and I'm gonna hold your hand through it. this one's short and it's a banger, no cap. π¦
β¨ NAME β¨
v.db.droptable β removes an existing attribute table of a vector map. yes. it drops the table. it's giving "delete that, periodt". π
π·οΈ KEYWORDS π·οΈ
vector, attribute table, database
πΈ SYNOPSIS πΈ
v.db.droptable
v.db.droptable --help
v.db.droptable [-f] map=name [table=name] [layer=string] [--help]
[--verbose] [--quiet] [--ui]
π Flags π
-fβ Force removal (required for actual deletion of table). like. this is THE flag. without it, nothing happens. it's the main character fr fr π--helpβ Print usage summary. your little bestie when you're lost π«Ά--verboseβ Verbose module output. chatty mode β¨--quietβ Quiet module output. shhh π€«--uiβ Force launching GUI dialog. clicks instead of keys π±οΈ
π§ Parameters π§
map=name[required] β Name of vector map. Or data source for direct OGR access. mandatory bestie, you cannot skip this one πtable=nameβ Table name (default: vector map name). so if you don't say anything, it just assumes the table has the same name as your map. cute of it πlayer=stringβ Layer number or name. Vector features can have category values in different layers. This number determines which layer to use. When used with direct OGR access this is the layer name. Default:1. so many layers, so little time π
π DESCRIPTION π
v.db.droptable removes an existing attribute table from a given vector map linked at given layer. that's the whole vibe.
β οΈ Big important warning, bestie: if the-fforce flag is not given then nothing is removed. literally nothing. you'll sit there thinking you dropped it and the table is still just. there. staring at you. π always pass-f, iykyk.
π NOTES π
v.db.droptable is a front-end to db.execute to allow easier usage. so it's the glow-up version of typing raw SQL commands by hand. iconic behavior honestly β¨
The existing database connection(s) can be verified with v.db.connect. go check what you're actually connected to before you start deleting things, that's just self care π§
π₯ EXAMPLE π₯
Removing attribute table connected to layer 1:
g.copy vect=roadsmajor,myroads
v.db.droptable myroads
v.db.droptable myroads -f
v.db.connect -p myroads
okay walk with me. first you g.copy so you don't mess up the original vibe π. then v.db.droptable myroads β and because there's no -f... nothing happens π. then v.db.droptable myroads -f β and NOW it actually deletes, slay π
. then v.db.connect -p myroads to peep the connections and confirm the table's gone. ate that whole sequence, no crumbs.
π SEE ALSO π
db.connect, db.execute, v.db.addtable, v.db.connect, v.db.dropcolumn, v.db.select, v.db.update
GRASS SQL interface
π« AUTHOR π«
Markus Neteler
π¦ SOURCE CODE π¦
Available at: v.db.droptable source code (history)
Latest change: Friday Feb 07 19:16:09 2025 in commit: a82a39f673b97fafcfce1604dc3e6015cb96487a
Main index | Vector index | Topics index | Keywords index | Graphical index | Full index
aaaand that's the page π run it with -f or don't run it at all, fr fr. this was GRASS 8.5.0, Β© 2003-2026 GRASS Development Team, GRASS 8.5.0 Reference Manual β last touched in that Feb 07 2025 commit above. mwah, bye bestie πππ¦
π¦ where this page comes from
- alpine 3.24: grass-gis-doc 8.5.0-r1 Β· GPL-2.0-or-later
- ubuntu stonking: grass-doc 8.5.0-1ubuntu1 Β· 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