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 -f force 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