desc: Describe Oracle Table

Description Usage Arguments Details Value Note See Also Examples

View source: R/desc.R

Description

Show the column names of an Oracle table (or view) and various column properties, not unlike the Oracle SQL*Plus DESC command. Also show the number of rows when the table was last analyzed.

Usage

1

Arguments

table

Oracle table name, often in the owner.table format.

tolower

whether output table strings should be lowercased.

dots

whether underscores in column names should be replaced with dots, converting col_name to col.name.

...

passed to dbConnect.

Details

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").

Value

A data frame with named rows and the following columns:

name

Oracle column name.

Sclass

storage mode in R.

type

Oracle type.

len

Oracle length.

precision

Oracle precision.

scale

Oracle scale.

isVarLength

whether the variable has varying length in Oracle.

nullOK

whether the variable can be null.

Furthermore, the data frame contains two attributes: rows (the number of rows when the table was last analyzed) and analyzed (when the table was last analyzed). These attributes are not available for all Oracle tables, but are more likely to be available when the main argument table has the full owner.table format.

Note

See the Oracle manuals for details about type, length, precision, scale, and nulls.

See Also

desc is to Oracle tables as ll (in package gdata) is to R data frames.

ora gives an overview of the package.

Examples

1
2
3
4
5
6
7
## Not run: 

desc("dual", tolower=FALSE)

desc("all_users")

## End(Not run)

ora documentation built on May 2, 2019, 3:22 a.m.