Oracle Rdb™ SQL Reference Manual Volume 4
Total Page:16
File Type:pdf, Size:1020Kb
Oracle Rdb™ SQL Reference Manual Volume 4 Release 7.3.2.0 for HP OpenVMS Industry Standard 64 for Integrity Servers and OpenVMS Alpha operating systems August 2016 ® SQL Reference Manual, Volume 4 Release 7.3.2.0 for HP OpenVMS Industry Standard 64 for Integrity Servers and OpenVMS Alpha operating systems Copyright © 1987, 2016 Oracle Corporation. All rights reserved. Primary Author: Rdb Engineering and Documentation group This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited. The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing. If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable: U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data delivered to U.S. Government customers are "commercial computer software" or "commercial technical data" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, the use, duplication, disclosure, modification, and adaptation shall be subject to the restrictions and license terms set forth in the applicable Government contract, and, to the extent applicable by the terms of the Government contract, the additional rights set forth in FAR 52.227-19, Commercial Computer Software License (December 2007). Oracle America, Inc., 500 Oracle Parkway, Redwood City, CA 94065. This software or hardware is developed for general use in a variety of information management applications. It is not developed or intended for use in any inherently dangerous applications, including applications that may create a risk of personal injury. If you use this software or hardware in dangerous applications, then you shall be responsible to take all appropriate fail-safe, backup, redundancy, and other measures to ensure its safe use. Oracle Corporation and its affiliates disclaim any liability for any damages caused by use of this software or hardware in dangerous applications. Oracle, Java, Oracle Rdb, Hot Standby, LogMiner for Rdb, Oracle SQL/Services, Oracle CODASYL DBMS, Oracle RMU, Oracle CDD/Repository, Oracle Trace, and Rdb7 are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners. This software or hardware and documentation may provide access to or information on content, products, and services from third parties. Oracle Corporation and its affiliates are not responsible for and expressly disclaim all warranties of any kind with respect to third-party content, products, and services. Oracle Corporation and its affiliates will not be responsible for any loss, costs, or damages incurred due to your access to or use of third-party content, products, or services. Contents Send Us Your Comments ........................................... xi Preface ........................................................... xiii 8 SQL Statements HELP Statement . ......................................... 8–2 IF Control Statement ........................................ 8–4 IMPORT Statement ......................................... 8–7 INCLUDE Statement ........................................ 8–31 INSERT Statement ......................................... 8–39 INSERT from FILENAME Statement . ......................... 8–55 INTEGRATE Statement ...................................... 8–58 ITERATE Control Statement . ................................. 8–75 LEAVE Control Statement . ................................. 8–77 LOCK TABLE Statement ..................................... 8–80 LOOP Control Statement ..................................... 8–84 OPEN Statement . ......................................... 8–87 Operating System Invocation ( $ ) Statement ...................... 8–92 PREPARE Statement ........................................ 8–94 PRINT Statement . ......................................... 8–105 QUIT Statement . ......................................... 8–107 RELEASE Statement ........................................ 8–108 RELEASE SAVEPOINT Statement ............................. 8–112 RENAME Statement ........................................ 8–115 REPEAT Control Statement . ................................. 8–124 REPLACE Statement ........................................ 8–127 RETURN Control Statement . ................................. 8–141 REVOKE Statements ........................................ 8–143 iii REVOKE Statement . ...................................... 8–144 REVOKE Statement: ANSI/ISO-Style ........................... 8–155 REVOKE Statement: Roles ................................... 8–164 ROLLBACK Statement ...................................... 8–166 ROLLBACK TO SAVEPOINT Statement . ...................... 8–171 SAVEPOINT Statement ...................................... 8–174 SELECT Statement: General Form ............................. 8–177 SELECT Statement: Singleton Select ........................... 8–192 SET Statement ............................................ 8–196 SET ALIAS Statement . ...................................... 8–218 SET QUERY Statement ...................................... 8–221 SET CONSTRAINTS Statement . .............................. 8–226 SET ANSI Statement . ...................................... 8–229 SET AUTOMATIC TRANSLATION Statement .................... 8–232 SET CATALOG Statement .................................... 8–235 SET CHARACTER LENGTH Statement . ...................... 8–240 SET COMPOUND TRANSACTIONS Statement ................... 8–244 SET CONNECT Statement ................................... 8–246 SET Control Statement ...................................... 8–250 SET DEFAULT CHARACTER SET Statement .................... 8–252 SET DEFAULT CONSTRAINT MODE Statement .................. 8–254 SET DEFAULT DATE FORMAT Statement . ...................... 8–257 SET DIALECT Statement .................................... 8–260 SET DISPLAY Statement .................................... 8–275 SET DISPLAY CHARACTER SET Statement ..................... 8–282 SET FLAGS Statement ...................................... 8–285 SET HOLD CURSORS Statement .............................. 8–320 SET IDENTIFIER CHARACTER SET Statement .................. 8–323 SET KEYWORD RULES Statement ............................ 8–325 SET LITERAL CHARACTER SET Statement ..................... 8–328 SET NAMES Statement ...................................... 8–330 SET NATIONAL CHARACTER SET Statement ................... 8–333 SET OPTIMIZATION LEVEL Statement . ...................... 8–335 SET QUIET COMMIT Statement .............................. 8–340 SET QUOTING RULES Statement ............................. 8–342 SET SCHEMA Statement .................................... 8–346 SET SESSION AUTHORIZATION Statement ..................... 8–350 iv SET SQLDA Statement ...................................... 8–352 SET TRANSACTION Statement ............................... 8–359 SET VIEW UPDATE RULES Statement ......................... 8–387 SHOW Statement . ......................................... 8–391 SIGNAL Control Statement . ................................. 8–434 Simple Statement . ......................................... 8–439 START TRANSACTION Statement ............................. 8–441 TRACE Control Statement . ................................. 8–446 TRUNCATE TABLE Statement ................................ 8–452 UNDECLARE Variable Statement .............................. 8–456 UPDATE Statement ......................................... 8–457 WHENEVER Statement ..................................... 8–465 WHILE Control Statement . ................................. 8–468 Index Examples 8–1 Updating the Database File Using Repository Definitions . ........ 8–62 8–2 Modifying Repository Definitions Using the INTEGRATE Statement with the ALTER DICTIONARY Clause ....................... 8–66 8–3 Storing Existing Database File Definitions in the Repository ...... 8–70 8–4 Modifying Repository Field Using the INTEGRATE DOMAIN Statement with the ALTER DICTIONARY Clause .............. 8–73 Tables 8–1 SQL Statements That Can Be Dynamically Executed ............ 8–99 8–2 Comparison between RENAME and ALTER Statements . ........ 8–118 8–3 Supported SQL*Plus SET statements ........................ 8–205 8–4 Logical Names for Internationalization of SET Statements ........ 8–207 8–5 Dialect Settings ......................................... 8–261 8–6 Debug Flag Keywords . ................................. 8–286 8–7 SQL Share Modes ....................................... 8–363 8–8 Comparison of Row Locking for Updates ...................... 8–364 8–9 Phenomena Permitted at Each Isolation Level . ................ 8–365 8–10 Effects of Lock Specifications on Multiuser Access ............... 8–369 v 8–11 Defaults for the SET and DECLARE TRANSACTION Statements ............................................. 8–371 8–12 Phenomena Permitted at Each Isolation Level ................