1. Modify the field data type
Syntax:
Alter table name MODIFY (column name data type );
Eg1:
Alter table emp modify (column1 VARCHAR (10 ));
When modifying the length of a column, you can only edit a longer length than the existing field actually saves, otherwise the following error is prompted: ORA-01441: cannot reduce the column length because some values are too large
2. Add a column
Syntax: alter table name ADD (column name data type); eg1: alter table emp ADD (column1 NUMBER (38,0) not null );
3. Change the list
Syntax: alter table name rename column current COLUMN name TO new COLUMN name; eg1: alter table emp rename column column1 TO column2;
4. delete a column
Syntax: alter table table Name drop column column name; eg1: alter TABLE emp drop COLUMN column1
5. Change the table name
Syntax: alter table current table name rename to new TABLE name; eg1: alter table emp rename to emp_new
6. Add comments to the table
Comment column on table name. column name is 'comment content'; // modify comment on table emp. column1 IS 'comment content'; // Modify table comment