Learn R Programming

odbc (version 1.4.2)

dbListTables,OdbcConnection-method: List remote tables and fields for an ODBC connection

Description

dbListTables() provides names of remote tables accessible through this connection; dbListFields() provides names of columns within a table.

Usage

# S4 method for OdbcConnection
dbListTables(
  conn,
  catalog_name = NULL,
  schema_name = NULL,
  table_name = NULL,
  table_type = NULL,
  ...
)

# S4 method for OdbcConnection,character dbListFields( conn, name, catalog_name = NULL, schema_name = NULL, column_name = NULL, ... )

Value

A character vector of table or field names respectively.

Arguments

conn

A DBIConnection object, as returned by dbConnect().

catalog_name, schema_name, table_name

Catalog, schema, and table names.

By default, catalog_name, schema_name and table_name will automatically escape underscores to ensure that you match exactly one table. If you want to search for multiple tables using wild cards, you will need to use odbcConnectionTables() directly instead.

table_type

The type of the table to return, the default returns all table types.

...

Other parameters passed on to methods.

name

The table name, passed on to dbQuoteIdentifier(). Options are:

  • a character string with the unquoted DBMS table name, e.g. "table_name",

  • a call to Id() with components to the fully qualified table name, e.g. Id(schema = "my_schema", table = "table_name")

  • a call to SQL() with the quoted and fully qualified table name given verbatim, e.g. SQL('"my_schema"."table_name"')

column_name

The name of the column to return, the default returns all columns.