Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

NAME

list - display databases, schemas, tables or views defined in a database server

SYNOPSIS

list database
list [-h] databases
list [-d DATABASE] [-h] schemas
list [-d DATABASE] [-h] [-s SCHEMA] tables
list [-d DATABASE] [-h] [-s SCHEMA] views

DESCRIPTION

list shows currently connected database or displays the list of databases, schemas, tables or views defined in the connected RDBMS server. The connection to the RDBMS server needs to be established before the list command is executed.
When a list of databases is displayed, an asterisk character, '*', is appended to the name of the currently connected database. Depends on the connected RDBMS server, a database name and/or a schema name might be required to list schemas, tables or views. Please see Aqua Open APIs documentation for more information.

OPTIONS

-d DATABASE
The name of the database from which to look up data, default to the currently connected database.
-h
Display output with headers; headers are not shown by default.
-s SCHEMA
The name of the schema from which to look up data, default to the currently connected schema.

EXAMPLES

To list the databases in a server use the command:

Code Block
list databases

To list the databases with headers use the -h option

Code Block
list -h databases

To list the schemas of a particular database use the -d option together with schemas keyword:

Code Block
list -d AQUAFOLD -h schemas

To list all the tables of a database:

Code Block
list -d AQUAFOLD -h tables

To list all the views of a database:

Code Block
list -d AQUAFOLD -h views

NOTES

-d: does not work on SQLite
-s: does not work on SQLite

SEE ALSO

change
describe
connect