pg_dropColumn: Helper command to drop a column via ALTER TABLE.
Description
Helper command to drop a column via ALTER TABLE.
Usage
pg_dropColumn(
column_name,
cascade = FALSE,
restrict = FALSE,
if_exists = FALSE
)
Value
A string, PostgreSQL helper statement to drop a column using ALTER TABLE.
Arguments
- column_name
A string, the name of the column to drop.
- cascade
Boolean, if TRUE, adds CASCADE to the DROP COLUMN statement.
- restrict
Boolean, if TRUE, adds RESTRICT to the DROP COLUMN statement.
- if_exists
Boolean, if TRUE, adds IF EXISTS to the DROP COLUMN statement.
Examples
Run this codepg_dropColumn(
column_name = "newCol"
)
Run the code above in your browser using DataLab