Oracle Magazine, September/October 2017
Database Application Developer and DBA BEYOND SQL 101 EMPLOYEE 16 13 MAY 2017 14 46 32 ORACLE MAGAZINE SEPTEMBER OCTOBER 2017 118 3 rows selected The OFF setting suppresses the output to the screen if the commands are executed from a script file Finally FEEDBACK or FEED returns a count of the records returned by a query or statement Setting this value to 0 or OFF suppresses the feedback Additionally if you are using Oracle Database 12c Release 2 122010 you can use the ONLY option to display feedback but not results This might come in handy if you are performing any sort of troubleshooting on the performance of your SQL statement and its execution plan Although the default spooled output is formatted as fixed character length plaintext reports you can also generate your output as HTML by inserting the following SQL Plus command into your database script files SET MARKUP HTML ON Listing 7 adds this SQL Plus command to the parameterize_ your_ script sql file and displays the resultant HTML file markup and an approximation of the files appearance in a web browser Remember to change your output file extension to one that a web browser can read Additionally the HTML output will look better when SQL Plus FEEDBACK is set to OFF To go back to spooling plain text output run the SET MARKUP HTML OFF command Code Listing 7 Change your output file from a text file to an HTML file Incorporate the SQL Plus command into your parameterize_ your_ script sql file to output an HTML file spool user_ table_ last_ analyzed html set markup html on spool on
You must have JavaScript enabled to view digital editions.