Learn R Programming

MSSQL (version 1.0.1)

tableNcol: Number of Columns

Description

Return the number of columns in a database table.

Usage

tableNcol(channel, sqtable)

Value

Number of columns as integer.

Arguments

channel

an RODBC connection.

sqtable

a database table or view.

See Also

tableDim and tableNrow also return the dimensions of a database table.

sqlColumns is the underlying function used to examine the table columns.

ncol is the base function to return the number of columns for data frames inside the R workspace.

MSSQL-package gives an overview of the package.

Examples

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

tableNcol(con, "sysusers")
}

Run the code above in your browser using DataLab