db.columns(1grass)
okay so we're doing db.columns(1grass) today, straight out of the GRASS User's Manual, and honestly? she's a little legend π
π NAME π
db.columns β List all columns for a given table. that's it, that's the whole job, and she does it flawlessly β¨
π KEYWORDS π
- database
- attribute table
β¨ SYNOPSIS β¨
db.columns
db.columns --help
db.columns [-e] table=name [driver=name] [database=name]
[separator=character] format=name [--help] [--verbose] [--quiet]
[--ui]
π Flags:
-eβ Print type information about the columns. like, print the name and the type of all the columns for a given table. receipts included, bestie.--helpβ Print usage summary--verboseβ Verbose module output--quietβ Quiet module output--uiβ Force launching GUI dialog
π¦ Parameters:
table=name[required] β Name of attribute tabledriver=nameβ Name of database driver- Options:
dbf,mysql,odbc,ogr,pg,sqlite - Default:
sqlite
- Options:
database=nameβ Name of database- Default:
$GISDBASE/$LOCATION_NAME/$MAPSET/sqlite/sqlite.db
- Default:
separator=characterβ Field separator- Special characters:
pipe,comma,space,tab,newline
- Special characters:
format=name[required] β Output format- Options:
plain,csv,json,list - Default:
plain plain: Configurable plain text outputcsv: CSV (Comma Separated Values)json: JSON (JavaScript Object Notation)list: Output in list format
- Options:
π DESCRIPTION π
db.columns lists all columns for a given table. no cap, that's the whole vibe. and the way she connects to databases? through the dbf, shp, odbc and pg drivers. iconic behavior, honestly. π₯
π NOTE π
if the parameters for your database connection are already set with db.connect, they get taken as default values β so you don't have to specify them every single time like it's your first day π she remembers. she always remembers. π«Ά
πΈ EXAMPLES πΈ
π List columns of a PostgreSQL attribute table
db.columns table=zipcodes_wake driver=pg database=grassdb
and if the database parameters are already set, you can just list the columns directly like the main character you are:
db.columns table=zipcodes_wake
π¦ 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
okay note this one down because it matters β the SQLite backend is the default setting. she's the default for a reason π
db.columns driver=sqlite table=archsites database=β$GISDBASE/$LOCATION_NAME/$MAPSET/sqlite/sqlite.dbβ
π₯ SEE ALSO π₯
db.connectdb.describedb.driversdb.droptabledb.executedb.logindb.tables- GRASS SQL interface
- GRASS SQL interface
yes bestie, GRASS SQL interface is listed twice in the original. we keep it twice. we don't edit the queen's handwriting πβ¨
π AUTHOR π
Radim Blazek, ITC-Irst, Trento, Italy π
π§ SOURCE CODE π§
Available at: db.columns source code (history)
Latest change: Saturday Jan 31 03:52:33 2026 in commit: 5dd1f9083055d3047f66dba6c3aec01c50dbdf2d
Main index | Database index | Topics index | Keywords index | Graphical index | Full index
Β© 2003-2026 GRASS Development Team, GRASS 8.5.0 Reference Manual
and that's the whole page, bestie!! π courtesy of GRASS 8.5.0, and yeah the footer literally just says db.columns(1grass) again because the manual loves a callback. go list some columns, you've got this πβ¨π¦
π¦ 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