In Oracle database, use the ALTER TABLE statement to delete table fields: Syntax: ALTER TABLE table_name DROP COLUMN column_name; Before deleting a field, make sure that there is no constraint referencing the field. When the field contains data, the data needs to be cleared first. Deleting fields is irreversible, so please consider carefully before operating.
Oracle database delete table field statement
In Oracle database, you can use ALTER TABLE
statement to delete fields in the table.
Syntax:
<code class="sql">ALTER TABLE table_name DROP COLUMN column_name;</code>
Description:
table_name
is the table to be modified The name. column_name
is the name of the field to be deleted. Example:
Delete the age
field in the table named customers
:
<code class="sql">ALTER TABLE customers DROP COLUMN age;</code>
Note:
The above is the detailed content of oracle database delete table field statement. For more information, please follow other related articles on the PHP Chinese website!