EVOLUTION-MANAGER
Edit File: dbRemoveTable.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Remove a table from the database</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for dbRemoveTable {DBI}"><tr><td>dbRemoveTable {DBI}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Remove a table from the database</h2> <h3>Description</h3> <p>Remove a remote table (e.g., created by <code><a href="dbWriteTable.html">dbWriteTable()</a></code>) from the database. </p> <h3>Usage</h3> <pre> dbRemoveTable(conn, name, ...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>conn</code></td> <td> <p>A <a href="DBIConnection-class.html">DBIConnection</a> object, as returned by <code><a href="dbConnect.html">dbConnect()</a></code>.</p> </td></tr> <tr valign="top"><td><code>name</code></td> <td> <p>A character string specifying a DBMS table name.</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>Other parameters passed on to methods.</p> </td></tr> </table> <h3>Value</h3> <p><code>dbRemoveTable()</code> returns <code>TRUE</code>, invisibly. If the table does not exist, an error is raised. An attempt to remove a view with this function may result in an error. </p> <p>An error is raised when calling this method for a closed or invalid connection. An error is also raised if <code>name</code> cannot be processed with <code><a href="dbQuoteIdentifier.html">dbQuoteIdentifier()</a></code> or if this results in a non-scalar. </p> <h3>Additional arguments</h3> <p>The following arguments are not part of the <code>dbRemoveTable()</code> generic (to improve compatibility across backends) but are part of the DBI specification: </p> <ul> <li> <p><code>temporary</code> (default: <code>FALSE</code>) </p> </li> <li> <p><code>fail_if_missing</code> (default: <code>TRUE</code>) </p> </li></ul> <p>These arguments must be provided as named arguments. </p> <p>If <code>temporary</code> is <code>TRUE</code>, the call to <code>dbRemoveTable()</code> will consider only temporary tables. Not all backends support this argument. In particular, permanent tables of the same name are left untouched. </p> <p>If <code>fail_if_missing</code> is <code>FALSE</code>, the call to <code>dbRemoveTable()</code> succeeds if the table does not exist. </p> <h3>Specification</h3> <p>A table removed by <code>dbRemoveTable()</code> doesn't appear in the list of tables returned by <code><a href="dbListTables.html">dbListTables()</a></code>, and <code><a href="dbExistsTable.html">dbExistsTable()</a></code> returns <code>FALSE</code>. The removal propagates immediately to other connections to the same database. This function can also be used to remove a temporary table. </p> <p>The <code>name</code> argument is processed as follows, to support databases that allow non-syntactic names for their objects: </p> <ul> <li><p> If an unquoted table name as string: <code>dbRemoveTable()</code> will do the quoting, perhaps by calling <code>dbQuoteIdentifier(conn, x = name)</code> </p> </li> <li><p> If the result of a call to <code><a href="dbQuoteIdentifier.html">dbQuoteIdentifier()</a></code>: no more quoting is done </p> </li></ul> <h3>See Also</h3> <p>Other DBIConnection generics: <code><a href="DBIConnection-class.html">DBIConnection-class</a></code>, <code><a href="dbAppendTable.html">dbAppendTable</a>()</code>, <code><a href="dbCreateTable.html">dbCreateTable</a>()</code>, <code><a href="dbDataType.html">dbDataType</a>()</code>, <code><a href="dbDisconnect.html">dbDisconnect</a>()</code>, <code><a href="dbExecute.html">dbExecute</a>()</code>, <code><a href="dbExistsTable.html">dbExistsTable</a>()</code>, <code><a href="dbGetException.html">dbGetException</a>()</code>, <code><a href="dbGetInfo.html">dbGetInfo</a>()</code>, <code><a href="dbGetQuery.html">dbGetQuery</a>()</code>, <code><a href="dbIsReadOnly.html">dbIsReadOnly</a>()</code>, <code><a href="dbIsValid.html">dbIsValid</a>()</code>, <code><a href="dbListFields.html">dbListFields</a>()</code>, <code><a href="dbListObjects.html">dbListObjects</a>()</code>, <code><a href="dbListResults.html">dbListResults</a>()</code>, <code><a href="dbListTables.html">dbListTables</a>()</code>, <code><a href="dbReadTable.html">dbReadTable</a>()</code>, <code><a href="dbSendQuery.html">dbSendQuery</a>()</code>, <code><a href="dbSendStatement.html">dbSendStatement</a>()</code>, <code><a href="dbWriteTable.html">dbWriteTable</a>()</code> </p> <h3>Examples</h3> <pre> con <- dbConnect(RSQLite::SQLite(), ":memory:") dbExistsTable(con, "iris") dbWriteTable(con, "iris", iris) dbExistsTable(con, "iris") dbRemoveTable(con, "iris") dbExistsTable(con, "iris") dbDisconnect(con) </pre> <hr /><div style="text-align: center;">[Package <em>DBI</em> version 1.1.0 <a href="00Index.html">Index</a>]</div> </body></html>