dbCreateTable() method calls
Backends compliant to ANSI SQL 99 don't need to override it.
Backends with a different SQL syntax can override
backends with entirely different ways to create tables need to
override this method.
A DBIConnection object, as returned by
The table name, passed on to
Either a character vector or a data frame.
A named character vector: Names are column names, values are types.
Names are escaped with
A data frame: field types are generated using
Other parameters passed on to methods.
row.names argument is not supported by this method.
Process the values with
sqlRownamesToColumn() before calling this method.
The argument order is different from the
sqlCreateTable() method, the
latter will be adapted in a later release of DBI.
If the table exists, an error is raised; the remote table remains unchanged.
An error is raised when calling this method for a closed
or invalid connection.
An error is also raised
name cannot be processed with
or if this results in a non-scalar.
Invalid values for the
unsupported data types,
also raise an error.
The following arguments are not part of the
(to improve compatibility across backends)
but are part of the DBI specification:
They must be provided as named arguments. See the "Specification" and "Value" sections for details on their usage.
name argument is processed as follows,
to support databases that allow non-syntactic names for their objects:
If an unquoted table name as string:
dbCreateTable() will do the quoting,
perhaps by calling
dbQuoteIdentifier(conn, x = name)
If the result of a call to
dbQuoteIdentifier(): no more quoting is done
temporary argument is
TRUE, the table is not available in a
second connection and is gone after reconnecting.
Not all backends support this argument.
A regular, non-temporary table is visible in a second connection,
in a pre-existing connection,
and after reconnecting to the database.
SQL keywords can be used freely in table names, column names, and data. Quotes, commas, and spaces can also be used for table names and column names, if the database supports non-syntactic identifiers.
row.names argument must be missing
NULL, the default value.
All other values for the
and a string)
raise an error.
Other DBIConnection generics:
1 2 3 4
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.