您好,欢迎访问一九零五行业门户网

sqlplus 技巧 spool 指定格式的文件

欢迎进入oracle社区论坛,与200万技术人员互动交流 >>进入 sqlplus的技巧实在是多,以后慢慢总结了。 sql column f new_val f sql select to_char(sysdate,'yyyymmddhh24miss')||'.txt' f from dual; f ------------------ 20050124174926.txt sql spool f c
欢迎进入oracle社区论坛,与200万技术人员互动交流 >>进入
sqlplus的技巧实在是多,以后慢慢总结了。
sql> column f new_val f
sql> select to_char(sysdate,'yyyymmddhh24miss')||'.txt' f from dual;
f
------------------
20050124174926.txt
sql> spool &f
connected to:
oracle8i enterprise edition release 8.1.7.0.0 - production
with the partitioning option
jserver release 8.1.7.0.0 - production
sql> column f new_val f
sql> select to_char(sysdate,'yyyymmddhh24miss')||'.txt' f from dual;
f
------------------
20050124174926.txt
sql> spool &f
sql> select * from tab;
tname                          tabtype  clusterid
------------------------------ ------- ----------
emp                            table
fk1                            table
hashtab                        table
hashtab5                       table
hashtable                      table
hashtabt                       table
mlog$_t                        table
mlog$_t_master                 table
ob                             table
pk1                            table
plan_table                     table
tname                          tabtype  clusterid
------------------------------ ------- ----------
rupd$_t                        table
rupd$_t_master                 table
t                              table
tcaaa                          table
testlong                       table
testlong2                      table
tran                           table
tttt                           table
t_master                       table
vvv                            table
21 rows selected.
sql> spool off
sql> host type &f
sql> select * from tab;
tname                          tabtype  clusterid
------------------------------ ------- ----------
emp                            table
fk1                            table
hashtab                        table
hashtab5                       table
hashtable                      table
hashtabt                       table
mlog$_t                        table
mlog$_t_master                 table
ob                             table
pk1                            table
plan_table                     table
tname                          tabtype  clusterid
------------------------------ ------- ----------
rupd$_t                        table
rupd$_t_master                 table
t                              table
tcaaa                          table
testlong                       table
testlong2                      table
tran                           table
tttt                           table
t_master                       table
vvv                            table
21 rows selected.
sql> spool off
sql>
其它类似信息

推荐信息