Oracle Magazine, September/October 2017
Database Application Developer and DBA BEYOND SQL 101 ORACLE MAGAZINE SEPTEMBER OCTOBER 2017 114 from user_ tables where table_ name like 1 and num_ rows 2 SQL @ parameterize_ your_ script sql EMPLOYEE 10 TABLE_ NAME NUM_ ROWS LAST_ ANALYZED EMPLOYEE 16 13 MAY 2017 14 46 32 EMPLOYEE_ IDENTITY 16 04 JAN 2017 01 00 32 EMPLOYEE_ SUBSET 16 11 MAY 2017 21 48 06 CUSTOMIZING YOUR RETURN ON INPUT Even though you know how to write and execute individual and multiple SQL statements within script files developers and DBAs incorporate SQL Plus commands into their scripts to change the settings of their SQL Plus environment and therefore customize how their scripts execute and return results The script you used to create the tables for the SQL_ 201 schemas used for this articles examples incorporates a couple of SQL Plus commands including the SPOOL command The example in Listing 5 demonstrates the utility of the SPOOL command Code Listing 5 Spool the results of your script file to a results file Incorporate the SQL Plus SPOOL command into your parameterize_ your_ script sql file spool user_ table_ last_ analyzed lst set verify off
You must have JavaScript enabled to view digital editions.