ALTER TABLE

Change the properties of an existing table.

Syntax:

Change the name, physical and logical storage parameters of an existing table. Enable or disable Constraints, Triggers and Primary Keys:

   ALTER TABLE properties 

Add, modify or drop columns:

   ALTER TABLE column_properties

Change the Constraints and Primary Key for an existing table:

   ALTER TABLE constraints

Add, modify or drop columns from a Partitioned table:

   ALTER TABLE partitioning_clause

Add, modify or drop columns from an external table:

   ALTER TABLE external_clause

Example

Add a column to a table:

   ALTER TABLE STAFF_OPTIONS ADD SO_INSURANCE_PROVIDER Varchar2(35);

For more examples - follow the links above

"At a good table we may go to school" ~ Thomas Fuller

Related Oracle Commands:

ANALYZE TABLE COMPUTE STATISTICS
ALTER INDEX
ALTER VIEW
COMMENT - Add a comment to a table or a column.
RENAME
DBMS_REDEFINITION

Related Views:

  DBA_ALL_TABLES       ALL_ALL_TABLES       USER_ALL_TABLES
  DBA_TABLES           ALL_TABLES           USER_TABLES          TAB
  DBA_TAB_COLUMNS      ALL_TAB_COLUMNS      USER_TAB_COLUMNS 
  DBA_PART_TABLES      ALL_PART_TABLES      USER_PART_TABLES  
                                                                DICTIONARY
                                                                DICT_COLUMNS

 
Copyright © 1999-2024 SS64.com
Some rights reserved