| quickSQL {RMySQL} | R Documentation |
Simplifies queries by submitting an SQL command and fetching its output in one function
quickSQL(con, statement, ...)
con |
an open dbConnection object.
|
statement |
an SQL statement as a character vector. |
... |
any additional arguments specific to the database engine may be specified. |
This function simply calls dbExecStatement
followed by fetch.
a data.frame
in the case of a SELECT-like statement, or
NULL otherwise.
Perhaps this function should be named dbQuery
or dbImmediate?
See the Omega Project for Statistical Computing at http://www.omegahat.org for more details on the R/S database interface.
On database managers:
On connections, SQL statements and resultSets:
dbExecStatement
dbExec
fetch
quickSQL
On transaction management:
On meta-data:
describe
getVersion
getDatabases
getTables
getFields
getCurrentDatabase
getTableIndices
getException
getStatement
hasCompleted
getRowCount
getAffectedRows
getNullOk
getInfo
# The following extract all the tables in the current database
mgr <- dbManager("MySQL")
con <- dbConnect(mgr)
quickSQL(con, "show tables")