sqlplus 导出excel&html

xiaoxiao2021-02-28  80

参考网络

示例如下: 1.main.sql脚本:

$ more main.sql set linesize 200 set term off verify off feedback off pagesize 999 set markup html on entmap ON spool on preformat off spool tables.xls @get_tables.sql spool off exit

2.get_tables.sql脚本:

$ more get_tables.sql select owner,table_name,tablespace_name,blocks,last_analyzed from all_tables order by 1,2;

3.执行并获得输出: $ sqlplus "/ as sysdba" @main

此处输出为xls文件,通过下图我们可以看到输出效果: Excel输出 把main.sql脚本中的,spool tables.xls更改为spool tables.htm,我们可以获得htm格式输出

转载请注明原文地址: https://www.6miu.com/read-20702.html

最新回复(0)