Learn R Programming

ora (version 2.0-1)

tables: List Oracle Tables

Description

List all tables in the database belonging to a specific owner or table space.

Usage

tables(owner="%", table="%", space="%", tolower=TRUE, ...)

Arguments

owner
owner name.
table
table name.
space
table space name.
tolower
whether owner, table, and space output entries should be lowercased.
...
passed to dbConnect.

Value

owner
owner name.
table
table name.
space
table space name.
rows
number of rows when the table was last analyzed.
analyzed
when the table was last analyzed.

Details

The arguments owner, table, and space are passed as patterns that are matched by LIKE, where % means any number of characters and _ means exactly one character. Literal % and _ are escaped using two backslashes: "\\%" and "\\_".

In other words, the default value "%" matches all strings.

The ... argument can be used to set username, password, and/or dbname (see dbConnect). Abbrevations like user and pass are allowed. The default database name is determined by the environment variable ORACLE_SID, which can be redefined within an R session using Sys.setenv(ORACLE_SID="foo").

See Also

tables is to Oracle as ll (in package gdata) is to R environments.

ora gives an overview of the package.

Examples

Run this code
## Not run: 
# 
# # Tables belonging to owner "sys":
# tables("sys")
# 
# # Tables whose name contains "map", preceded by at least one character:
# tables(,"%_map%")
# 
# # Tables whose name ends with "_map":
# tables(,"%\\_map")
# 
# ## End(Not run)

Run the code above in your browser using DataLab