Reference and syntax for the ALTER TABLE command.
Parameter | Description |
---|---|
<table> | Name of the table to which to add the column. |
<column_name> | An identifier that specifies the name of the column that will be added to the table. |
<column_type> | Specifies the data type for the column. |
IF NOT EXISTS | If specified, this clause prevents an error message that would occur if the column already exists in the table. |
DEFAULT <expression>
| Determines the value that will be used for the column when this column is omitted in an INSERT
statement. It also determines the value that is used for the rows that were inserted before the column was added. |
| NULL
| NOT NULL
| Determines if the column may or may not contain NULL
s. |
CURRENT_DATE()
, LOCALTIMESTAMP()
, CURRENT_TIMESTAMP()
, and NOW()
.Parameter | Description |
---|---|
<table> | Name of the table from which to drop the partition. |
<value1>[,...<value2>] | An ordered set of one or more values corresponding to the partition key definition. This specifies the partition to drop. When dropping partitions with composite keys (more than one key value), specify all key values in the same order as they were defined. Only partitions with values that match the entire composite key are dropped. |
information_schema.tables
view on table_owner
column.
check ownership page for more info.
Parameter | Description |
---|---|
<table> | Name of the table to change the owner of. |
<user> | The new owner of the table. |
Parameter | Description |
---|---|
<table_name> | The name of the table to rename. |
<new_table_name> | The new name of the table. |