Oracle is one of the most popular databases, powerful, excellent performance, relative to the difficulty of learning is not small. This article is to share some of their experience to everyone, to do a accumulation, to facilitate their own and other learners.
To modify a field type or length:
ALTER TABLE name modify field name segment type (character length)
Cases:
ALTER TABLE table_name MODIFY COLUMN_NAME varchar (10);
This is standard SQL and applies to any database
To modify a field name:
ALTER TABLE name rename column Old field name to new field name
Cases:
ALTER TABLE table_name Rename column old_column to New_column;
Add fields:
ALTER TABLE name Add (field name segment type and length)
ALTER TABLE table_name Add (one_column VARCHAR2 (10));
If you add more than one field at a time, each field is directly separated.
The following example:
ALTER TABLE table_name Add (One_column varchar2), Two_column varchar2 (5),....)
To delete a field:
ALTER TABLE name drop (field name)
ALTER TABLE table_name drop (one_column); or ALTER TABLE table_name drop column
one_column;
Delete multiple fields at once, separated by each field in parentheses.
The following example:
ALTER TABLE table_name DROP (One_column,two_column,...)
Summarize
The above is for you to sum up the Oracle to the field additions and deletions to change the entire contents of the statement, I hope that we can help. If you have questions or questions, you can leave a message.