Delete Column in DB2 Table: Quick Guide

To remove a field from a DB2 table, you can use the ALTER TABLE statement and specify the name of the field to be deleted.

Here is the syntax for deleting a column in a table:

Modify the table by removing a specific column.

In this case, table_name refers to the name of the table from which the column needs to be deleted, and column_name refers to the name of the column that needs to be removed.

For example, to delete the field called “salary” from a table named “employees”, you can execute the following SQL statement:

Remove the salary column from the employees table.

bannerAds