Library

Product



Oracle Rdb7TM

Oracle Rdb7TM

Introduction to SQL

Release 7.0

Part No. A40827-1


Corporate Copyright Notice

Copyright 1991, 1996 Oracle Corporation.

All rights reserved.

IMPORTANT - READ CAREFULLY BEFORE VIEWING AND/OR USING THIS DOCUMENTATION IN ANY WAY. NO PART OF THIS DOCUMENTATION 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.

This software contains proprietary information of Oracle Corporation; it is provided under a license agreement containing restrictions on use and disclosure and is also protected by copyright law. Reverse engineering of the software 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.

Restricted Rights Legend Programs delivered subject to the DOD FAR Supplement are 'commercial computer software' and use, duplication and disclosure of the programs 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-14, Rights in Data---General, including Alternate III (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 of Oracle Corporation.

Oracle CDD/Repository, Rdb7, and Oracle Rdb, are trademarks of Oracle Corporation.

All other company or products names are used for identification purposes only, and may be trademarks of their respective owners.


Contents


Preface

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.

You can send comments to us in the following ways:

If you like, you can use the following questionnaire to give us feedback. (Edit the online release notes file, extract a copy of this questionnaire, and send it to us.)

If you find any errors or have any other suggestions for improvement, please indicate the chapter, section, and page number (if available).


Preface

SQL (structured query language) serves as the primary database interface supplied with Oracle Rdb software.

Purpose of This Manual

This manual provides an introduction to the SQL language as implemented by Oracle Rdb and the interactive SQL interface. This manual introduces you to SQL language through an extensive set of examples. You can enter and experiment with the examples interactively at your terminal or workstation using an Oracle Rdb sample database. You create the sample database from files supplied with the kit. To become familiar with using SQL with host language programs, read the Oracle Rdb7 Guide to SQL Programming.

Intended Audience

This manual primarily addresses users who have little or no knowledge of SQL and who want a basic understanding of the SQL interactive interface. To profit most from your reading, you should know the basic concepts and terminology of relational database management systems and of your operating system.

How This Manual Is Organized

This manual contains the following chapters:
Chapter 1 Provides an overview of the SQL interactive environment on OpenVMS.
Chapter 2 Provides an overview of the SQL interactive environment on Digital UNIX.
Chapter 3 Describes how to display information about an Oracle Rdb database using interactive SQL.
Chapter 4 Describes how to retrieve data from an Oracle Rdb database using basic SQL statements.
Chapter 5 Explains how to insert, update, and delete data in an Oracle Rdb database using interactive SQL.
Chapter 6 Explains how to construct advanced queries using interactive SQL.
Chapter 7 Provides information about naming and storing schema objects in a multischema Oracle Rdb database.
Chapter 8 Explains how to use date-time data types in interactive SQL.

Related Manuals

The following manuals contain information pertinent to your work with SQL:

See the Oracle Rdb7 Release Notes for a complete list of the manuals in the Oracle Rdb documentation set.

Conventions

In examples, an implied carriage return occurs at the end of each line, unless otherwise noted. You must press the Return key at the end of a line of input.

OpenVMS means both the OpenVMS Alpha operating system and the OpenVMS VAX operating system.

Oracle Rdb refers to Oracle Rdb for OpenVMS and software. Version 7.0 of Oracle Rdb software is often referred to as V7.0.

The SQL interface to Oracle Rdb is referred to as SQL. This interface is the Oracle Rdb implementation of the SQL standard ANSI X3.135-1992, ISO 9075:1992, commonly referred to as the ANSI/ISO standard or SQL92.

Oracle CDD/Repository software is referred to as the dictionary, the data dictionary, or the repository.

The following conventions are also used in this manual:
[Ctrl]/x This symbol indicates that you hold down the Ctrl (control) key while you press another key or mouse button (indicated here by x).
[Return] In examples, a boxed symbol indicates that you must press the named key. For example, this symbol indicates the Return key.
.
.
.
Vertical ellipsis points in an example mean that information not directly related to the example has been omitted.
... Horizontal ellipsis points in statements or commands mean that parts of the statement or command not directly related to the example have been omitted.
e, f, t Index entries in the printed manual may have a lowercase e, f, or t following the page number; the e, f, or t is a reference to the example, figure, or table, respectively, on that page.
boldface text Boldface type in text indicates a term defined in the text.
< > Angle brackets enclose user-supplied names.
[ ] Brackets enclose optional clauses from which you can choose one or none. When brackets enclose several options, the options are separated by the word "or."
$ The dollar sign represents the DIGITAL Command Language prompt in OpenVMS and the Bourne shell prompt in Digital UNIX.

Samples Directory

This manual uses the term Samples directory to refer to the /usr/lib/dbs/sql/vnn/examples subdirectory, where nn is replaced with the version of Oracle Rdb you are using. (For example, if you are using Oracle Rdb V7.0, the samples directory is /usr/lib/dbs/sql/v70/examples.) This subdirectory contains sample programs and the script that creates the sample databases.


Technical Changes and New Features

This section identifies the new and updated portions of this manual since it was last released with Version 6.0 of Oracle Rdb.

The major new features and technical changes that are described in this manual include:


Next | Contents



Library

Product

Copyright ©1996, Oracle Corporation All rights reserved.