EVOLUTION-MANAGER
Edit File: sqlCreateTable.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: Compose query to create a simple table</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 sqlCreateTable {DBI}"><tr><td>sqlCreateTable {DBI}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Compose query to create a simple table</h2> <h3>Description</h3> <p>Exposes an interface to simple <code style="white-space: pre;">CREATE TABLE</code> commands. The default method is ANSI SQL 99 compliant. This method is mostly useful for backend implementers. </p> <h3>Usage</h3> <pre> sqlCreateTable(con, table, fields, row.names = NA, temporary = FALSE, ...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>con</code></td> <td> <p>A database connection.</p> </td></tr> <tr valign="top"><td><code>table</code></td> <td> <p>Name of the table. Escaped with <code><a href="dbQuoteIdentifier.html">dbQuoteIdentifier()</a></code>.</p> </td></tr> <tr valign="top"><td><code>fields</code></td> <td> <p>Either a character vector or a data frame. </p> <p>A named character vector: Names are column names, values are types. Names are escaped with <code><a href="dbQuoteIdentifier.html">dbQuoteIdentifier()</a></code>. Field types are unescaped. </p> <p>A data frame: field types are generated using <code><a href="dbDataType.html">dbDataType()</a></code>.</p> </td></tr> <tr valign="top"><td><code>row.names</code></td> <td> <p>Either <code>TRUE</code>, <code>FALSE</code>, <code>NA</code> or a string. </p> <p>If <code>TRUE</code>, always translate row names to a column called "row_names". If <code>FALSE</code>, never translate row names. If <code>NA</code>, translate rownames only if they're a character vector. </p> <p>A string is equivalent to <code>TRUE</code>, but allows you to override the default name. </p> <p>For backward compatibility, <code>NULL</code> is equivalent to <code>FALSE</code>.</p> </td></tr> <tr valign="top"><td><code>temporary</code></td> <td> <p>If <code>TRUE</code>, will generate a temporary table statement.</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>Other arguments used by individual methods.</p> </td></tr> </table> <h3>Details</h3> <p>The <code>row.names</code> argument must be passed explicitly in order to avoid a compatibility warning. The default will be changed in a later release. </p> <h3>Examples</h3> <pre> sqlCreateTable(ANSI(), "my-table", c(a = "integer", b = "text")) sqlCreateTable(ANSI(), "my-table", iris) # By default, character row names are converted to a row_names colum sqlCreateTable(ANSI(), "mtcars", mtcars[, 1:5]) sqlCreateTable(ANSI(), "mtcars", mtcars[, 1:5], row.names = FALSE) </pre> <hr /><div style="text-align: center;">[Package <em>DBI</em> version 1.1.0 <a href="00Index.html">Index</a>]</div> </body></html>