dcsimg
Database Journal
MS SQL Oracle DB2 Access MySQL PostgreSQL Sybase PHP SQL Etc SQL Scripts & Samples Tips Database Forum

» Database Journal Home
» Database Articles
» Database Tutorials
MS SQL
Oracle
DB2
MS Access
MySQL
» RESOURCES
SQL Scripts & Samples
Tips
» Database Forum
» Slideshows
» Sitemap
Free Newsletters:
DatabaseDaily  

By submitting your information, you agree that databasejournal.com may send you databasejournal offers via email, phone and text message, as well as email offers about other products and services that databasejournal believes may be of interest to you. databasejournal will process your information in accordance with the Quinstreet Privacy Policy.

News Via RSS Feed


Database Journal |DBA Support |SQLCourse |SQLCourse2
 

Featured Database Articles

Oracle

Posted Mar 25, 2002

Listen Software's How To: SQL Plus Reports and Commands

By David Nishimoto

  • set headsep--identifies a single character to split a title onto two or more lines
  • ttitle--Top Title
  • btitle--Bottom Title
  • column--Heading and format of a column
  • break on--Spaces between the section
  • compute sum--Calculate subtotals
  • set linesize--Set the maximum number of characters per line
  • set pagesize--Set the number of lines per page
  • set newpage--Set the number of lines between pages
  • spool--Move screen I/O to file I/O
  • set pause--Makes screen display stop between pages
  • save--Save an sql query to file
  • host--Sends commands to the host operating system
  • start--Execute sql from a file
  • edit--Edit sql stored in a file
  • define_editor--name the editor

Example:

column {field name} heading 'Enter Column Description' 
   format ann \| 9990.99  truncate \| word_wrapped

Other Commands

  • list--Outputs the contents of the SQL Buffer
  • clear buffer--Removes the contents of the SQL Buffer
  • append--Add contents the end of the SQL Buffer
  • c\{search pattern}\{replace pattern}--Changes a search pattern with a replace pattern for the SQL Buffer.

Running SQL Statements

connect user/password@host

; or / -> to run SQL

@filename -> run the SQL in a file



Oracle Archives

Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 




Latest Forum Threads
Oracle Forum
Topic By Replies Updated
Oracle Data Mining: Classification jan.hasller 0 July 5th, 07:19 AM
Find duplicates - Unique IDs Lava 5 July 2nd, 08:30 AM
no matching unique or primary key rcanter 1 April 25th, 12:32 PM
Update values of one table based on condition of values in other table using Trigger Gladiator 3 February 29th, 06:01 PM