Learn R Programming

MSSQL (version 1.0.1)

tableHead: First Rows

Description

Return the first rows of a database table.

Usage

tableHead(channel, sqtable, n = 3)

Value

Data frame with the first n rows of the database table or view.

Arguments

channel

an RODBC connection.

sqtable

a database table or view.

n

number of rows to get.

See Also

sqlQuery with tableQuote are the underlying functions used to query the table/view.

head is the base function to return the first parts of an object inside the R workspace.

tableOverview shows the data types and dimensions of a database table.

MSSQL-package gives an overview of the package.

Examples

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

tableHead(con, "sysusers")

t(tableHead(con, "sysusers", 1))
}

Run the code above in your browser using DataLab