| dbExecute,DatabaseConnectorConnection,character-method | R Documentation |
Executes a statement and returns the number of rows affected.
dbExecute() comes with a default implementation
(which should work with most backends) that calls
dbSendStatement(), then dbGetRowsAffected(), ensuring that
the result is always freed by dbClearResult().
For passing query parameters, see dbBind(), in particular
the "The command execution flow" section.
## S4 method for signature 'DatabaseConnectorConnection,character'
dbExecute(conn, statement, translate = TRUE, ...)
conn |
A DBIConnection object, as returned by
|
statement |
a character string containing SQL. |
translate |
Translate the query using SqlRender? |
... |
Other parameters passed on to methods. |
You can also use dbExecute() to call a stored procedure
that performs data manipulation or other actions that do not return a result set.
To execute a stored procedure that returns a result set,
or a data manipulation query that also returns a result set
such as INSERT INTO ... RETURNING ..., use dbGetQuery() instead.
dbExecute() always returns a
scalar
numeric
that specifies the number of rows affected
by the statement.
For queries: dbSendQuery() and dbGetQuery().
Other DBIConnection generics:
DBIConnection-class,
dbAppendTable(),
dbAppendTableArrow(),
dbCreateTable(),
dbCreateTableArrow(),
dbDataType(),
dbDisconnect(),
dbExistsTable(),
dbGetException(),
dbGetInfo(),
dbGetQuery(),
dbGetQueryArrow(),
dbIsReadOnly(),
dbIsValid(),
dbListFields(),
dbListObjects(),
dbListResults(),
dbListTables(),
dbQuoteIdentifier(),
dbReadTable(),
dbReadTableArrow(),
dbRemoveTable(),
dbSendQuery(),
dbSendQueryArrow(),
dbSendStatement(),
dbUnquoteIdentifier(),
dbWriteTable(),
dbWriteTableArrow()
Other command execution generics:
dbBind(),
dbClearResult(),
dbGetRowsAffected(),
dbSendStatement()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.