Learn R Programming

MSSQL (version 1.0.1)

dbOverview: Overview of Tables and Views

Description

Get dimensions and first few column names of tables and views in a database.

Usage

dbOverview(channel, schema = "dbo", dim = TRUE, peek = 2, ...)

Value

Data frame containing six columns:

Name

name of table/view.

Schema

database schema.

Type

type of table/view.

Rows

number of rows.

Cols

number of columns.

First

first column names.

Arguments

channel

an RODBC connection.

schema

database schema.

dim

whether to calculate the number of rows and columns for each table/view.

peek

how many column names to show. The value FALSE has the same effect as zero.

...

passed to sqlTables.

Details

The dim = FALSE option results in faster computation, but the Rows and Cols columns will only contain NA values. Similarly, the peek = FALSE results in faster computation, but the First column will only contain NA values. These options can be useful to get a quick overview of a large database.

See Also

sqlTables is the underlying function used to get the list of tables/views, tableDim is used to count rows and columns, and sqlColumns is used to peek at the first column names.

dbStorage shows the storage size of tables and dbTime shows the time when tables/views were created and last modified.

MSSQL-package gives an overview of the package.

Examples

Run this code
if (FALSE) {
con <- odbcConnect("myDatabase")

dbOverview(con)

dbOverview(con, dim=FALSE, peek=FALSE)
}

Run the code above in your browser using DataLab