日期:2014-05-17 浏览次数:21040 次
declare
l_t varchar2(100):=upper('&a');
begin
execute immediate 'create table '
------解决方案--------------------
l_t
------解决方案--------------------
'_bak as select * from '
------解决方案--------------------
l_s
------解决方案--------------------
' where 1=2 ';
for c in (select COLUMN_NAME,data_type from user_tab_columns where table_name=l_t) loop
if c.data_type not in ('VARCHAR2','VARCHAR','CHAR') then
execute immediate 'alter table '
------解决方案--------------------
l_t
------解决方案--------------------
'_bak modify '
------解决方案--------------------
c.COLUMN_NAME
------解决方案--------------------
' VARCHAR2(2000) ';
END LOOP;
END;