db.columns(1)

πŸ’… db.columns β€” GRASS GIS User's Manual πŸ’…

okay bestie, welcome to db.columns, a GRASS GIS User's Manual page, and honestly? it's giving "short queen, huge utility." πŸŽ€


✨ NAME ✨

db.columns β€” list all columns for a given table. that's it. that's the whole job. and she ate. πŸ’–


🏷️ KEYWORDS 🏷️

database, attribute table

iykyk. πŸ¦‹


πŸ“œ SYNOPSIS πŸ“œ

db.columns
db.columns --help
db.columns table=name  [driver=name]   [database=name]   [--help]
[--verbose]  [--quiet]  [--ui]

🚩 Flags:

  • --help β€” print the usage summary, like a lil cheat sheet 🫢
  • --verbose β€” verbose module output, she's chatty now πŸ’¬
  • --quiet β€” quiet module output, shhh, no yapping 🀫
  • --ui β€” force launching the GUI dialog, main character energy ✨

🧩 Parameters:

  • table=name [required] β€” name of the attribute table. yeah this one is not optional bestie, you gotta give her the table πŸ’…
  • driver=name β€” name of the database driver
    • Options: dbf, mesql, mysql, odbc, ogr, pg, sqlite
    • Default: sqlite
  • database=name β€” name of the database
    • Default: $GISDBASE/$LOCATION_NAME/$MAPSET/sqlite/sqlite.db

🌸 DESCRIPTION 🌸

db.columns lists all columns for a given table. that's the vibe check β€” she looks at your table and reads you the whole cast list of columns. πŸ“‹

connections to databases are supported through the dbf, shp, odbc and pg drivers. multiple ways in, one icon behavior. periodt. πŸ‘‘


πŸ“Œ NOTE πŸ“Œ

if the parameters for a database connection are already set with db.connect, they get taken as the default values, so you do NOT need to specify them every single time. she remembers. she's thoughtful like that. 🫢


πŸ§ͺ EXAMPLES πŸ§ͺ

🐘 List columns of a PostgreSQL attribute table

db.columns table=zipcodes_wake driver=pg database=grassdb

if the database parameters are already set, the columns can be listed directly:

db.columns table=zipcodes_wake

look at her, effortless, no extra args needed πŸ’…

πŸ—‚οΈ List columns from Shape file with DBF attribute table

db.columns table=zipcodes_wake driver=dbf database=/grassdata/nc_spm_08/PERMANENT/dbf/

πŸͺΆ List columns of table in SQLite database

note that the SQLite backend is the default setting, bestie. she's the baseline. the blueprint. the moment. ⭐
db.columns driver=sqlite table=archsites database=’$GISDBASE/$LOCATION_NAME/$MAPSET/sqlite/sqlite.db’

πŸ‘€ SEE ALSO πŸ‘€

db.connect, db.describe, db.drivers, db.droptable, db.execute, db.login, db.tables, GRASS SQL interface

GRASS SQL interface

(yes, GRASS SQL interface said it twice, she's just that important πŸ’–)


✍️ AUTHOR ✍️

Radim Blazek, ITC-Irst, Trento, Italy


πŸ’Ύ SOURCE CODE πŸ’Ύ

Available at: db.columns source code (history)

Accessed: Saturday Jan 17 05:40:33 2026

Main index | Database index | Topics index | Keywords index | Graphical index | Full index

Β© 2003-2025 GRASS Development Team, GRASS GIS 8.4.2 Reference Manual


and that's a wrap on the GRASS GIS 8.4.2 reference manual moment β€” this page was accessed Saturday Jan 17 05:40:33 2026, and yes the footer says GRASS 8.4.2 and db.columns(1) because she's ✨iconic✨ and she knows it. go list some columns, bestie, you got this πŸŽ€πŸ’–πŸ¦‹

πŸ“¦ where this page comes from