SQL*Plus® User’s Guide and Reference Release 8.1.6 October, 1999 Part No. A75664-01 SQL*Plus User’s Guide and Reference, Release 8.1.6 Part No. A75664-01 Copyright © 1996, 1999, Oracle Corporation. All rights reserved. Contributing Authors: Larry Baer, Lisa Colston, Roland Kovacs, Karen Denchfield-Masterson, Alison Holloway, Sanjeev Jhala, Christopher Jones, Anita Lam, Nimish Mehta, Luan Nim, Bud Osterberg, Irene Paradisis, Richard Rendell, Frank Rovitto, Farokh Shapoorjee, Larry Stevens, Andre Touma, Simon Watt The Programs (which include both the software and documentation) contain proprietary information of Oracle Corporation; they are provided under a license agreement containing restrictions on use and disclosure and are also protected by copyright, patent, and other intellectual and industrial property laws. Reverse engineering, disassembly, or decompilation of the Programs is prohibited. The information contained in this document is subject to change without notice. If you find any problems in the documentation, please report them to us in writing. Oracle Corporation does not warrant that this document is error free. Except as may be expressly permitted in your license agreement for these Programs, no part of these Programs may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without the express written permission of Oracle Corporation. If the Programs are delivered to the U.S. Government or anyone licensing or using the programs on behalf of the U.S. Government, the following notice is applicable: Restricted Rights Notice Programs delivered subject to the DOD FAR Supplement are "commercial computer software" and use, duplication, and disclosure of the Programs including documentation, shall be subject to the licensing restrictions set forth in the applicable Oracle license agreement. Otherwise, Programs delivered subject to the Federal Acquisition Regulations are "restricted computer software" and use, duplication and disclosure of the Programs shall be subject to the restrictions in FAR 52.227-19, Commercial Computer Software - Restricted Rights (June, 1987). Oracle Corporation, 500 Oracle Parkway, Redwood City, CA 94065. The Programs are not intended for use in any nuclear, aviation, mass transit, medical, or other inherently dangerous applications. It shall be the licensee's responsibility to take all appropriate fail-safe, back up, redundancy, and other measures to ensure the safe use of such applications if the Programs are used for such purposes, and Oracle disclaims liability for any damages caused by such use of the Programs. Oracle is a registered trademark, and JDeveloper, Oracle Designer, Oracle Developer, Oracle Discoverer, Oracle7, Oracle8, Oracle8i, Oracle Media Objects, Oracle Mobile Agents, Oracle Application Server, PL/SQL, Oracle Programmer, SQL*Forms, Net8 and SQL*Plus are trademarks or registered trademarks of Oracle Corporation. All other company or product names mentioned are used for identification purposes only and may be trademarks of their respective owners. Contents Send Us Your Comments ................................................................................................................... xi Preface........................................................................................................................................................... xiii Part I Understanding SQL*Plus 1 Introduction Overview of SQL*Plus....................................................................................................................... 1-2 Basic Concepts............................................................................................................................... 1-2 Who Can Use SQL*Plus............................................................................................................... 1-2 Other Ways of Working with Oracle......................................................................................... 1-3 Using this Guide................................................................................................................................. 1-4 Conventions for Command Syntax............................................................................................ 1-4 Sample Tables................................................................................................................................ 1-5 What You Need to Run SQL*Plus ................................................................................................... 1-6 Hardware and Software .............................................................................................................. 1-6 Information Specific to Your Operating System...................................................................... 1-7 Username and Password............................................................................................................. 1-7 Access to Sample Tables .............................................................................................................. 1-8 2 Learning SQL*Plus Basics Getting Started .................................................................................................................................... 2-2 Using the Keyboard...................................................................................................................... 2-2 Starting SQL*Plus ......................................................................................................................... 2-3 iii Leaving SQL*Plus ......................................................................................................................... 2-4 Entering and Executing Commands................................................................................................ 2-5 Running SQL Commands............................................................................................................ 2-6 Running PL/SQL Blocks ........................................................................................................... 2-10 Running SQL*Plus Commands ................................................................................................ 2-11 Variables that Affect Running Commands............................................................................. 2-13 Saving Changes to the Database Automatically .................................................................... 2-13 Stopping a Command while it is Running.............................................................................. 2-15 Collecting Timing Statistics on Commands You Run ........................................................... 2-15 Running Host Operating System Commands........................................................................ 2-15 Getting Help ...................................................................................................................................... 2-16 Listing a Table Definition .......................................................................................................... 2-16 Listing PL/SQL Definitions ...................................................................................................... 2-17 Controlling the Display.............................................................................................................. 2-17 Interpreting Error Messages...................................................................................................... 2-17 3 Manipulating Commands Editing Commands ............................................................................................................................. 3-2 Listing the Buffer Contents ......................................................................................................... 3-3 Editing the Current Line.............................................................................................................. 3-4 Adding a New Line ...................................................................................................................... 3-5 Appending Text to a Line............................................................................................................ 3-6 Deleting Lines................................................................................................................................ 3-7 Editing Commands with a System Editor................................................................................. 3-8 Saving Commands for Later Use ..................................................................................................... 3-8 Storing Commands in Command Files ..................................................................................... 3-8 Placing Comments in Command Files .................................................................................... 3-12 Retrieving Command Files........................................................................................................ 3-13 Running Command Files........................................................................................................... 3-14 Nesting Command Files ............................................................................................................ 3-16 Modifying Command Files ....................................................................................................... 3-16 Exiting from a Command File with a Return Code............................................................... 3-17 Setting Up Your SQL*Plus Environment
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages394 Page
-
File Size-