spool c:\truncate.sql
select 'truncate table '|| table_name||'..' from ...where table_name like '..';
spool off;
@c:\truncate.sql
select 'truncate table '|| table_name||'..' from ...where table_name like '..';
spool off;
@c:\truncate.sql
spool c:\truncate.sql
select 'truncate table '|| table_name||'DROP STORAGE' from USER_TABLES where table_name like '%HIS%';
spool off;
能否再详细介绍一下这个是什么意思。
set feedback off
spool c:\truncate.sql
select 'truncate table '|| table_name||'DROP STORAGE;' from USER_TABLES where table_name like '%HIS%';
spool off;
@c:\truncate.sql
select * from USER_TABLES where table_name like '%HIS%';
TRUNCATE TABLE JOB_HIS DROP STORAGE
:)
set heading off
set feedback off
spool c:\truncate.sql
select 'truncate table '|| table_name||' DROP STORAGE;' from USER_TABLES where table_name like '%HIS%';
spool off;
----------
123.123456SQL> spool c:\truncate.sql
SQL> select 'truncate table '|| table_name||' DROP STORAGE;' from USER_TABLES
2 where table_name ='A';'TRUNCATETABLE'||TABLE_NAME||'DROPSTORAGE;'
-----------------------------------------------------------
truncate table A DROP STORAGE;SQL> spool off;
SQL> @c:\truncate.sql
SP2-0734: 未知的命令开头 "SQL> selec..." - 忽略了剩余的行。
SP2-0734: 未知的命令开头 "'TRUNCATET..." - 忽略了剩余的行。表已截掉。SP2-0734: 未知的命令开头 "SQL> spool..." - 忽略了剩余的行。
SQL> select * from a;未选定行SQL>