Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

dbListFields-DatabaseConnectorConnection-character-method

List field names of a remote table


Description

List field names of a remote table

Usage

## S4 method for signature 'DatabaseConnectorConnection,character'
dbListFields(conn, name, database = NULL, schema = NULL, ...)

Arguments

conn

A DBIConnection object, as returned by dbConnect().

name

a character string with the name of the remote table.

database

Name of the database.

schema

Name of the schema.

...

Other parameters passed on to methods.

Value

dbListFields() returns a character vector that enumerates all fields in the table in the correct order. This also works for temporary tables if supported by the database. The returned names are suitable for quoting with dbQuoteIdentifier(). If the table does not exist, an error is raised. Invalid types for the name argument (e.g., character of length not equal to one, or numeric) lead to an error. An error is also raised when calling this method for a closed or invalid connection.

See Also

dbColumnInfo() to get the type of the fields.


DatabaseConnector

Connecting to Various Database Platforms

v4.0.2
Apache License
Authors
Martijn Schuemie [aut, cre], Marc Suchard [aut], Observational Health Data Science and Informatics [cph], Microsoft Inc. [cph] (SQL Server JDBC driver), PostgreSQL Global Development Group [cph] (PostgreSQL JDBC driver), Oracle Inc. [cph] (Oracle JDBC driver), Amazon Inc. [cph] (RedShift JDBC driver)
Initial release
2021-04-12

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.