Executes an SQL query and immediately frees all allocated resources.
dbExecQuery(conn, statement, rollbackOnError = FALSE)
a DBI
connection object.
a character string with the SQL statement to be executed.
logical; if TRUE
, then the function executes rollback on current transaction if an exception occurs.
This function may be used to execute queries like CREATE TABLE
,
UPDATE
, INSERT
, etc.
It has its own exception handler, which prints out detailed information on caught errors.