Oracle Rdb™ SQL Reference Manual Volume 2
Total Page:16
File Type:pdf, Size:1020Kb
Oracle Rdb™ SQL Reference Manual Volume 2 Release 7.3.3.0 for HP OpenVMS Industry Standard 64 for Integrity Servers and OpenVMS Alpha operating systems November 2018 ® SQL Reference Manual, Volume 2 Oracle Rdb Release 7.3.3.0 for HP OpenVMS Industry Standard 64 for Integrity Servers and OpenVMS Alpha operating systems Copyright © 1987, 2018 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 ........................................... vii Preface ........................................................... ix 6 SQL Statements ACCEPT Statement ......................................... 6–2 ALTER Statements ......................................... 6–7 ALTER CONSTRAINT Statement .............................. 6–8 ALTER DATABASE Statement ................................ 6–14 ALTER DOMAIN Statement . ................................. 6–92 ALTER FUNCTION Statement ................................ 6–110 ALTER INDEX Statement . ................................. 6–118 ALTER MODULE Statement . ................................. 6–142 ALTER OUTLINE Statement ................................. 6–152 ALTER PROCEDURE Statement .............................. 6–158 ALTER PROFILE Statement . ................................. 6–164 ALTER ROLE Statement ..................................... 6–169 ALTER SEQUENCE Statement ................................ 6–172 ALTER STORAGE MAP Statement ............................. 6–181 ALTER SYNONYM Statement ................................. 6–197 ALTER TABLE Statement . ................................. 6–199 ALTER TRIGGER Statement . ................................. 6–245 ALTER USER Statement ..................................... 6–249 ALTER VIEW Statement ..................................... 6–252 ATTACH Statement ......................................... 6–258 BEGIN DECLARE Statement ................................. 6–269 CALL Statement for Simple Statements ......................... 6–272 CALL Statement for Compound Statements ...................... 6–275 iii CASE (Searched) Control Statement ............................ 6–279 CASE (Simple) Control Statement .............................. 6–281 CLOSE Statement .......................................... 6–284 COMMENT ON Statement ................................... 6–286 COMMIT Statement . ...................................... 6–294 Compound Statement . ...................................... 6–301 CONNECT Statement . ...................................... 6–318 CREATE Statements . ...................................... 6–331 CREATE CACHE Clause ..................................... 6–332 CREATE CATALOG Statement . .............................. 6–344 CREATE COLLATING SEQUENCE Statement .................... 6–348 CREATE DATABASE Statement . .............................. 6–353 CREATE DOMAIN Statement . .............................. 6–419 CREATE FUNCTION Statement . .............................. 6–434 CREATE INDEX Statement ................................... 6–435 CREATE MODULE Statement . .............................. 6–464 CREATE OUTLINE Statement . .............................. 6–490 CREATE PROCEDURE Statement ............................. 6–517 CREATE PROFILE Statement . .............................. 6–518 CREATE ROLE Statement ................................... 6–524 CREATE ROUTINE Statement . .............................. 6–529 CREATE SCHEMA Statement . .............................. 6–550 Index Tables 6–1 Updating Data Definitions While Users Are Attached to the Database .............................................. 6–69 6–2 Updating Database-Wide Parameters While Users Are Attached to the Database ........................................... 6–72 6–3 Constraint Attributes Syntax Permutations and Equivalents . ..... 6–210 6–4 ALTER and DROP Statements Causing or Not Causing Stored Routine Invalidation ..................................... 6–473 iv Send Us Your Comments Oracle Rdb for OpenVMS Oracle SQL Reference Manual, Release 7.3.3.0 Oracle Corporation welcomes your comments and suggestions on the quality and usefulness of this publication. Your input is an important part of the information used for revision. • Did you find any errors? • Is the information clearly presented? • Do you need more information? If so, where? • Are the examples correct? Do you need more examples? • What features did you like most? If you find any errors or have any other suggestions for improvement, please indicate the document title, chapter, section, and page number (if available). You can send comments to us in the following ways: • Electronic mail:[email protected] • FAX — 603-897-3825 Attn: Oracle Rdb • Postal service: Oracle Corporation Oracle Rdb Documentation One Oracle Drive Nashua, NH 03062-2804 USA If you would like a reply, please give your name, address, telephone number, and (optionally) electronic mail address. If you have problems with the software, please contact your local Oracle Support Services. vii Preface This manual describes the syntax and semantics of statements and language elements for the SQL (structured query language) interface to the Oracle Rdb database software. Intended Audience To get the most out of this manual, you should be familiar with data processing procedures, basic database management concepts and terminology, and the OpenVMS operating system. Operating System Information You can find information about the versions of the operating system and optional software that are compatible with this version of Oracle Rdb in the Oracle Rdb Installation and Configuration Guide. For information on the compatibility of other software products with this version of Oracle Rdb, refer to the Oracle Rdb Release Notes. Contact your Oracle representative if you have questions about the compatibility of other software products with this version of Oracle Rdb. Access to Oracle Support Oracle customers have access to electronic support through My Oracle Support. For information, visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=info or visit http://www.oracle.com/pls/topic/lookup?ctx=acc&id=trs if you are hearing impaired. ix Structure This manual is divided into five volumes. Volume 1 contains Chapter 1 through Chapter 5 and an index. Volume 2 contains Chapter 6 and an index. Volume 3 contains Chapter 7 and an index. Volume 4 contains Chapter 8 and an index. Volume 5 contains the appendixes and an index. The index for each volume contains entries for the respective volume only and does not contain index entries from the other volumes in