In Oracle, you can use the "alter table add" statement to add fields to the table. The added fields can only be placed behind the existing fields and cannot be inserted between existing fields. The syntax is "Alter Table Table name Add field name field type".
The operating environment of this tutorial: Windows 10 system, Oracle 11g version, Dell G3 computer.
How to add fields in oracle table
Use sql statement to add
1. Add a field: (Add field When, it can only be arranged after existing fields and cannot be inserted between existing fields)
Alter Table t_si_addr Add CHG_ADDR_FLAG number(1,0);
Alter Table Table name Add field name Field type;
2. Add two fields ;
Alter Table t_si_addr Add (CHG_ADDR_FLAG number(1,0),ADD_BY_IOM Varchar2(2));
Alter Table table name Add (field name field type, field name field type);
Examples are as follows:
Recommended tutorial: "Oracle Tutorial》
The above is the detailed content of How to add fields to a table in Oracle. For more information, please follow other related articles on the PHP Chinese website!