Oracle uses SQL statements to modify the Field Type 1. If the table does not have data SQL code
Alter table name modify (field name Type 1, field name Type 2, field name Type 3 .....) alter table student modify (id number (4); --- change the id field in the student table to number and the length is 4 alter table student modify (id number (4 ), studentName varchar2 (100 ));
2. If there is data SQL code in the original table
-- Modify the original field name alter table name rename column field name TO field name 1;
-- ADD a field with the same name as the original field alter table name ADD field name VARCHAR2 (30); -- update the original data to the new field, be sure to display the data type conversion (different from MSSQL) UPDATE table name SET field name = CAST (field name 1 AS VARCHAR2 (30 ));
-- Delete the original backup field alter table Name drop column field name 1;