Odbc Driver Numbers

Odbc driver numbers search

The odbc package provides a DBI-compliant interface to Open Database Connectivity (ODBC) drivers. It allows for an efficient, easy way to setup connection to any database using an ODBC driver, including SQL Server, Oracle, MySQL, PostgreSQL, SQLite and others. The implementation builds on the nanodbc C++ library.

ODBC drivers can typically be downloaded from your database vendor, or they can be downloaded from RStudio when used with RStudio professional products. The odbc package works with the DBI

Odbc

16.20 - Number Data Types - ODBC Driver for Teradata. The Teradata Database Number data types are available in ODBC if supported by the database. A Teradata Database Number type is either Fixed or Floating as listed in the following table. In ODBC the Number types are treated as standard SQL types. Microsoft ODBC Driver 13.1 for SQL Server is a single dynamic-link library (DLL) containing run-time support for applications using native-code APIs to connect to Microsoft SQL Server 2008, SQL Server 2008 R2, SQL Server 2012, SQL Server 2014, SQL Server 2016, Analytics Platform System, Azure SQL Database and Azure SQL Data Warehouse.


Using

All of the following examples assume you have already created a connection called con. To find out how to connect to your specific database type, please visit the Databases page.

Database information

The odbc package gives you tools to explore objects and columns in the database.

You can also see other data sources and drivers on the system.

Reading and writing tables

The DBI package has functions for reading and writing tables. dbWriteTable() will write an R data frame to a SQL table. dbReadTable() will read a SQL table into an R data frame.

You can specify tables outside the database with the Id() command.

Queries and statements

For interactive queries, use dbGetQuery() to submit a query and fetch the results. To fetch the results separately, use dbSendQuery() and dbFetch(). The n= argument in dbFetch() can be used to fetch partial results.

You can execute arbitrary SQL statements with dbExecute(). Note: many database API’s distinguish between direct and prepared statements. If you want to force a direct statement (for example, if you want to create a local temp table in Microsoft SQL Server), then pass immdediate=TRUE.

Odbc Driver Numbers List

NumbersOdbc driver list


odbc Performance Benchmarks

The odbc package is often much faster than the existing RODBC and DBI compatible RODBCDBI packages. The tests below were carried out on PostgreSQL and Microsoft SQL Server using the nycflights13::flights dataset (336,776 rows, 19 columns).

PostgreSQL Results

Odbc Drivers

PackageFunctionUserSystemElapsed
odbcReading5.1190.2906.771
RODBCDBIReading19.2031.35621.724
odbcWriting7.8023.70326.016
RODBCDBIWriting6.6933.78648.423
Odbc driver numbers list

Microsoft SQL Server Results

Odbc Driver Name

PackageFunctionUserSystemElapsed
odbcReading2.1870.1082.298
RSQLServerReading5.1011.2893.584
odbcWriting12.3360.41221.802
RSQLServerWriting645.21912.287820.806