How to Add Column After Specific Field in Oracle?
In Oracle database, you can use the ALTER TABLE statement to add a new column after a specific field. Here is an example:
ALTER TABLE 表名
ADD 列名 数据类型 [约束条件] AFTER 已有的字段名;
For example, if you want to add a new salary field after the hire_date field in the employees table, you can do it like this:
ALTER TABLE employees
ADD salary NUMBER(10, 2) AFTER hire_date;
This added a new field called “salary” after the hire date field, with a data type of NUMBER(10, 2).