Database Reference
In-Depth Information
ALTER TABLE Statement
Once you have created a table you can alter its structure using
the ALTER TABLE statement. You can add column, modify the
attributes of columns e.g. data type, attach a constraint, rename a
column or even drop it. All these tasks can be performed with an
ALTER TABLE statement as shown in the Figure 2-15.
Figure 2-15: Altering the table structure: The ALTER TABLE
statements. Certain modifications using ALTER TABLE statement are
not possible if you are already having the data inside that table. One
way of getting rid of unwanted column or unwanted data is to utilize
the power of CREATE TABLE AS statement.
Do keep in the back of your mind that these modifications are
100% possible when you are not having any data inside the table
but for cases where you already have data you cannot perform
certain task e.g if the NUMBER column already contains data
you cannot decrease its size etc.
 
Search WWH ::




Custom Search