Change the create statement for oracle to use for alter statements

  • 2020-11-25 07:39:07
  • OfStack

In PD, double-click a table to view its preview tag, and you will find the create statement for a table, as follows:
 
create table Company_Info ( 
Company_ID NVARCHAR2(50) not null, 
Area_ID NVARCHAR2(50), 
Mem_ID NVARCHAR2(50), 
Level_Id NVARCHAR2(50), 
Name NVARCHAR2(50) not null, 
Capital NVARCHAR2(50), 
Unit_Property NUMBER(2) not null, 
Economics_type NUMBER(2) not null, 
Man_Scale NUMBER(10,0), 
License_Code NVARCHAR2(50), 
License_Img NVARCHAR2(50), 
Intro NVARCHAR2(3000), 
Company_Img NVARCHAR2(200), 
Address NVARCHAR2(200), 
Postal_Code NVARCHAR2(50), 
Tel NVARCHAR2(50), 
Fax NVARCHAR2(50), 
Mobile NVARCHAR2(50) not null, 
Email NVARCHAR2(50) not null, 
Contactor_sex NUMBER(2), 
Contactor NVARCHAR2(50), 
Web_Site NVARCHAR2(200), 
View_Count NUMBER(20,0), 
Create_Date DATE not null, 
Update_Date DATE not null, 
Status NUMBER(2), 
Company_Type NUMBER(2), 
Remain_Point NUMBER(6,0), 
Cmp_Level NVARCHAR2(50), 
isAdv NUMBER(2), 
Expri_Date DATE, 
Display_index NUMBER(6,0), 
constraint PK_COMPANY_INFO primary key (Company_ID) 
); 

If we add some fields and want to add those fields to the original database, we can do this: change create to alter and then drop it
Field removal, as shown below:
 
alter table Company_Info add( 
Remain_Point NUMBER(6,0), 
Cmp_Level NVARCHAR2(50), 
isAdv NUMBER(2), 
Expri_Date DATE, 
Display_index NUMBER(6,0) 
) 

 This speeds up our development efficiency . 

Related articles: