db_drop_col: Drop (Delete) a Column (Field).

Description Usage Arguments Value Details Examples

View source: R/RMariaDBHelper.R

Description

Remove a column (field) to a database table.

Usage

1
db_drop_col(tablename, fieldname, conf_file = "~/.db_conf.yml")

Arguments

tablename

(character) A table name in a database.

fieldname

(character) A field name to remove from a database table.

conf_file

(character) A file containing database connection parameters. (Default: "~/.db_conf.yml")

Value

(integer) The number of rows affected by the field addition.

Details

An ALTER TABLE ... DROP COLUMN command will remove a field from a table in a database.

Examples

1
2
3
4
## Not run: 
db_drop_col("iris", "Species")

## End(Not run)

deohs/RMariaDBHelper documentation built on Dec. 31, 2020, 11:17 p.m.