||Oracle Tips by Burleson
If you use the ADD clause to add a new
column to the table, the initial value of each row for the new
column is null. You can add a column with a NOT NULL constraint only
to a table that contains no rows.
If you create a view with a query that uses
the asterisk (*) in the select list to select all columns from the
base table, and you subsequently add columns to the base table,
Oracle will not automatically add the new column to the view. To add
the new column to the view, you can re-create the view using the
CREATE VIEW command with the OR REPLACE option.
Operations performed by the ALTER TABLE
command can cause Oracle to invalidate procedures and stored
functions that access the table.
Modifying Column Definitions
You can use the MODIFY clause to change any
of the following parts of a column definition:
The MODIFY clause need only specify the
column name and the modified part of the definition, not the entire
Datatypes and Sizes
You can change:
A CHAR column to VARCHAR2 (or
A VARCHAR2 (or VARCHAR) to CHAR,
but only if the column contains nulls in all rows or if you do
not attempt to change the column size.
Any column’s datatype, or decrease
any column’s size, if all rows for the column contain nulls. You
can always increase the size of a character or raw column or the
precision of a numeric column.
See Code Depot
Copyright © 1996 - 2014 by
Burleson. All rights reserved.
Oracle® is the registered trademark
of Oracle Corporation.