网站开发 q3687474,装修网站横幅怎么做,成品网站nike源码1688,创意海报设计通过SQL*PLUS我们可以构建友好的输出#xff0c;满足多样化用户需求。本例通过简单示例#xff0c;介绍通过sql*plus输出xls#xff0c;html两种格式文件.首先创建两个脚本:1.main.sql用以设置环境#xff0c;调用具体功能脚本2.功能脚本-get_tables.sql为实现具体功能之脚…通过SQL*PLUS我们可以构建友好的输出满足多样化用户需求。本例通过简单示例介绍通过sql*plus输出xlshtml两种格式文件.首先创建两个脚本:1.main.sql用以设置环境调用具体功能脚本2.功能脚本-get_tables.sql为实现具体功能之脚本通过这样两个脚本可以避免spool中的冗余信息参考:如何去除SQLPLUS中SPOOL的冗余信息示例如下:1.main.sql脚本:[oraclejumper utl_file]$ more main.sqlset linesize 200set term off verify off feedback off pagesize 999set markup html on entmap ON spool on preformat offspool tables.xlsget_tables.sqlspool offexit2.get_tables.sql脚本:[oraclejumper utl_file]$ more get_tables.sqlselect owner,table_name,tablespace_name,blocks,last_analyzedfrom all_tables order by 1,2;3.执行并获得输出:[oraclejumper utl_file]$ sqlplus / as sysdba mainSQL*Plus: Release 9.2.0.4.0 - Production on Mon Apr 25 10:30:11 2005Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.Connected to:Oracle9i Enterprise Edition Release 9.2.0.4.0 - ProductionWith the Partitioning optionJServer Release 9.2.0.4.0 - ProductionDisconnected from Oracle9i Enterprise Edition Release 9.2.0.4.0 - ProductionWith the Partitioning optionJServer Release 9.2.0.4.0 - Production[oraclejumper utl_file]$ ls -l tables.xls-rw-r--r-- 1 oracle dba 69539 Apr 25 10:30 tables.xls[oraclejumper utl_file]$此处输出为xls文件通过下图我们可以看到输出效果: