117
DB2 RazorSQL Alter
The Alter command is used to make a change in the table.
For example:
- Add new column
- Add primary key
- Add foreign key
- Add constraints
- Change the type of column
- Drop column
- Drop Primary Key
- Drop Foreign Key
- Drop Constraint
Let’s add a new column “Department” in the table “Freshers”
You can see that the table is altered and a new column “Department” is added.
As the same way you can Add primary key
- Add foreign key
- Add constraints
- Change the type of column
- Drop column
- Drop Primary Key
- Drop Foreign Key
- Drop Constraint
Next TopicDB2 Drop