---
name: "db.tables"
section: "1grass"
platform: "linux"
package: "grass-doc"
version: "8.4.1-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/db.tables"
---

# db.tables(1grass)

Lists all tables for a given database.

## NAME

**db.tables**  - Lists all tables for a given database.

## KEYWORDS

database, attribute table

## SYNOPSIS

**db.tables**\
 **db.tables --help**\
 **db.tables** \[-**ps**\]  \[**driver**=*name*\]   \[**database**=*name*\]   \[--**help**\]  \[--**verbose**\]  \[--**quiet**\]  \[--**ui**\]

### Flags:

- **-p**

  Print tables and exit

- **-s**

  System tables instead of user tables

- **--help**

  Print usage summary

- **--verbose**

  Verbose module output

- **--quiet**

  Quiet module output

- **--ui**

  Force launching GUI dialog

### Parameters:

- **driver**=*name*

  Name of database driver\
   Options: *dbf, mysql, odbc, ogr, pg, sqlite*\
   Default: *sqlite*

- **database**=*name*

  Name of database\
   Default: *$GISDBASE/$LOCATION\_NAME/$MAPSET/sqlite/sqlite.db*

## DESCRIPTION

*db.tables* lists all tables for a given database.

## NOTE

If parameters for database connection are already set with db.connect, they are taken as default values and do not need to be spcified each time.

## EXAMPLES

### List all tables if database connection is already set

```
db.tables -p
```

### List all DBF tables

```
db.tables driver=dbf database=/grassdata/nc_spm_08/user1/PERMANENT/dbf
```

### List all tables in SQLite database (note that this is the default setting)

```
db.tables -p driver=sqlite database=’$GISDBASE/$LOCATION_NAME/$MAPSET/sqlite/sqlite.db’
```

## SEE ALSO

*db.columns,* *db.droptable,* *db.login,* *db.execute,* *GRASS SQL interface*

## AUTHOR

Unknown

## SOURCE CODE

Available at: db.tables source code (history)

Accessed: Monday Feb 24 17:50:23 2025

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

© 2003-2025 GRASS Development Team, GRASS GIS 8.4.1 Reference Manual
