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
解决方案 »
- Oracle 10g 出现中文乱码情况如何解决?
- 求高手解答,ORACLE 正在初始化或关闭 文件需要介质恢复???
- 递归 SQL 级别 1 出现错误
- 2个至强1.6gCUP 4G内存的专用ORACLE数据库服务器,SGA和其他参数怎么分配(或优化)?
- 请教一条sql语句如何写。
- 合并字符类型字段的PL/SQL怎么写
- 初学者提问:在LINUX下安装完oracle9I之后,该用哪个用户登录SQLPLUS,并创建用户和表空间
- sql语句:如何查找一个表中部分相同的记录?
- 打开的游标数据在什么位置存放?在线,非常感谢
- oracle中dblink创建时报错! 请高手回答!
- 如何能够实现一个SQL语句(select)定时每5分钟执行一次,并将结果累计输出
- 高分求救?如何实现LONG数据类型的全文检索
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>