With the SQL command "ALTER TABLE" you are able to add columns to your DB2 Tables for a long time. But before V7R1 you can only add columns to the end of the row. In V7R1 you can use the "BEFORE column" clause to specify the exact position where your new column should be inserted. Here is an example:
Table "customer"
Field | Type |
Customer_Number | CHAR(10) |
Customer_Name1 | CHAR(30) |
Customer_address | CHAR(30) |
With "
ALTER TABLE customer ADD COLUMN Customer_Name2 CHAR(30) BEFORE Customer_address" can you add a second name column to the correct position.
No comments:
Post a Comment