参考:
create or replace procedure replace_table_wz_property
authid current_user
as
str1 varchar2(1000);
str2 varchar2(1000);
str3 varchar2(5000);
begin
str1 := 'truncate table wz_property';
str2 := 'drop table wz_property';
str3 := 'create table WZ_PROPERTY
(
PROPERTYID VARCHAR2(32) not null,
ADDRESS VARCHAR2(100),
RELEASEDATE DATE,
IDCARD VARCHAR2(50),
HOUSEHOLDER VARCHAR2(100),
AREA NUMBER(12,2)
)
tablespace USERS
pctfree 10
initrans 1
maxtrans 255
storage
(
initial 1M
minextents 1
maxextents unlimited
) ';
execute immediate str1;
execute immediate str2;
execute immediate str3;
end replace_table_wz_property;