Home > Store

Guide to SQL Standard, A, 4th Edition

Register your product to gain access to bonus material or receive a coupon.

Guide to SQL Standard, A, 4th Edition

Book

  • Sorry, this book is no longer in print.
Not for Sale

Description

  • Copyright 1997
  • Dimensions: 6-1/4" x 9-1/4"
  • Pages: 544
  • Edition: 4th
  • Book
  • ISBN-10: 0-201-96426-0
  • ISBN-13: 978-0-201-96426-4

The SQL language has established itself as the linqua franca database management; it provides the basis for systems interoperability, application portability, client/server operation, distributed database, and more, and is supported by just about every DBMS on the market today. SQL2 - or, to give it its official name, the International Standard Database language SQL (1992) - represents a major set of extensions to the earlier SQL standard. For a start, the new specification is well over 600 pages, compared with less than 100 for the original version. No database professional can afford to ignore it.

Features
  • Thorough revision of the official ANSI standard for SQL.
  • Covers all important new SQL2 features including extensive integrity support, powerful new operators, national and international character data support and comprehensive date and time support.
  • Continues the tradition of careful, clear, and accurate explanations of complex technical material
Features New to this Edition
  • Covers extensive integrity support, powerful new operators, national and international character data support, all features of SQL2; comprehensive date and time support and clear explanation of the complexitites of Dynamic SQL, all features of SQL2.
  • Provides first tutorial treatment available anywhere of the brand new and dramatically extended version of SQL known informally as SQL2 or SQL/92.


0201964260B04062001

Sample Content

Table of Contents

(Most chapters begin with "Introduction".)

I. INTRODUCTION.

1. Why Sql is Important.

Background.

Is a Standard Desirable?

2. An Overview of Sql.

Introduction.

Data Definition.

Data Manipulation.

Cursor Operations.

Views.

Security and Integrity.

Recovery and Concurrency.

Schemas and Catalogs.

Sessions and Connections.

II. Some Preliminaries.

3. Basic Language Elements.

SQL Language Characters.

Tokens and Separators.

Key Words.

Identifiers and Names.

Scope of Names.

Notation.

4. Catalogs and Schemas.

The SQL-Environment.

Catalogs.

Schemas.

5. Connections, Sessions, and Transactions.

SQL-Agents

SQL-Connections

SQL-Sessions.

SQL-Transactions.

6. Binding Styles.

Introduction.

The Module Language.

Embedded Sql.

Direct Sql.

III. Data Definition and Manipulation.

7. Scalar Objects, Operators, and Expressions.

Introduction.

Data Types.

Literals.

Scalar Operators and Functions.

Aggregate Functions.

Assignments and Comparisons.

8. Data Definition: Domains and Base Tables.

Introduction.

Domains.

Base Tables.

9. Data Manipulation: Noncursor Operations.

Introduction.

Single-Row SELECT.

Insert.

Searched Update.

Searched Delete.

10. Data Manipulation: Cursor Operations.

Introduction.

Cursors.

Cursor-Based Manipulation Statements.

A Comprehensive Example (Module Version).

A Comprehensive Example (Embedded SQL Version).

11. Table Expressions.

Introduction.

Join Expressions.

Table References.

Unions, Differences, and Intersections.

Table Primaries.

Select Expressions.

Derived Table Column Names.

12. Conditional Expressions.

Introduction.

General Remarks.

Comparison Conditions.

BETWEEN and LIKE Conditions.

IN and MATCH Conditions.

ALL-Or-ANY Conditions.

EXISTS Conditions.

UNIQUE Conditions.

A Final Remark.

13. Views.

Introduction.

Data Definition Operations.

Data Manipulation Operations.

The Check Option.

IV. DATA CONTROL.

14. Integrity.

Introduction.

Domain Constraints.

General Constraints.

Base Table and Column Constraints.

Foreign Keys.

Deferred Constraint Checking.

15. Security.

Introduction.

Authorization Identifiers.

Privileges and Access Rules.

GRANT and REVOKE.

The Grant Option.

RESTRICT Vs CASCADE.

V. ADVANCED TOPICS.

16 Missing Information and Nulls.

Introduction.

Effect of Nulls on Scalar Expressions.

Effect of Nulls on Conditional Expressions.

Effect of Nulls on Table Expressions.

Effect of Nulls on Integrity Constraints.

A Recommendation.

17. Dates and Times.

Introduction.

Data Types.

Literals.

Time Zones.

Data Conversion.

Scalar Operators and Functions.

Assignments and Comparisons.

18. Temporary Tables.

Introduction.

Type 1: "Declared" Temporary Tables.

Types 2 and 3: "Created" Temporary Tables.

19. Character Data.

Introduction.

Properties of Character Strings.

Character Sets and Collations.

Data Types.

Literals.

Scalar Operators and Functions.

Assignments and Comparisons.

Character Sets For Identifiers.

20. Dynamic Sql.

Introduction.

What is The Problem?

Statement Preparation and Execution.

SQL Descriptor Areas.

Cursor Operations.

Session Defaults.

21. Information Schemas.

Introduction.

Information Schema Tables.

22. Exception Handling.

Status Codes.

The Diagnostics Area.

23. Call-Level Interface.

Introduction.

What is The Problem?

CLI Routines and Parameters.

CLI Resources and Related Matters.

Statement Preparation and Execution.

CLI Descriptor Areas.

Placeholders.

Retrieval Operations.

Exception Handling.

A Sample "SQLCLIH" File.

A Sample CLI Application.

APPENDIXES.

A. An Sql Grammar.

Introduction.

Sessions, Connections, and Transactions.

Data Definition.

Modules.

Data Manipulation.

Table Expressions.

Conditional Expressions.

Constraints.

Dynamic Sql.

Scalar Expressions.

Get Diagnostics.

Miscellaneous.

B. Language Levels and Conformance.

Introduction.

Intermediate Sql.

Entry Sql.

SQL Flagger.

C. Sql/92 Vs Sql/89.

Introduction.

Extensions.

Incompatibilities.

Deprecated Features.

D. Some Outstanding Issues.

Introduction.

The Issues.

E. Persistent Stored Modules.

Introduction.

Overview.

Routines, Modules, and Schemas.

Type Precedence.

Subject Routine Determination.

SQL Control Statements.

Exception Handling.

External Routines.

Miscellaneous Topics.

F. An Overview of Sql3.

Introduction.

Data Definition and Manipulation.

Functions and Operators.

Integrity.

Security.

Transactions.

G. References and Bibliography. 0201964260T04062001

Preface

Several changes have occurred in the SQL standards world since the previous edition of this book was published. First of all, a major new component, the Call-Level Interface (SQL/CLI), was added to the standard in 1995. Second, another major new component, the Persistent Stored Modules feature (SQL/PSM), is currently under development (and indeed nearing completion); SQL/PSM is not yet part of the standard but is virtually certain to become so in the near future. Third, the original standard itself has been significantly changed and corrected through the publication of two Technical Corrigenda, one in 1994 and one in 1996. Taken together, these changes are more than sufficient to justify this new (fourth) edition. At the same time, I have taken the opportunity to extend and improve the text throughout in numerous ways, and in particular to correct a few errors. It is not an exaggeration to say that scarcely a sentence survives intact from the third edition.

Acknowledgments

Once again I must thank my coauthor Hugh Darwen for his invaluable contribution (especially in connection with the SQL/PSM and SQL3 appendixes). I would also like to thank Paul Cotton and Frank Pellow for their help with the material on SQL/CLI; Peter Pistor for pointing out an error in the treatment of foreign keys in the previous edition; Mike Sykes for assistance with questions regarding SQL's date and time support (especially in connection with time zones); and Mel Zimowski for assistance with questions regarding SQL's "global transaction" support. I am also indebted to Nelson Mattos, Frank Pellow, and Jeff Richey for their careful reviews of the manuscript.

Finally, I am (as always) deeply indebted to my wife, Lindy, for her support throughout this project; to my editor, Elydia Davis, for her usual sterling job; and to the staff at Addison-Wesley for their usual help and professionalism. Once again it has been a pleasure to work with them.

Healdsburg, California
C. J. Date
1996


0201964260P04062001

Updates

Errata

Known errors in first printing

Date of this list: March 5th, 1997

Page 31, Section 3.3: PAD and SPACE are reserved key words, not nonreserved; MESSAGE_TEXT is an additional nonreserved key word.

Page 112, first paragraph: Replace the last sentence ("Omitting the parenthesized ... within that table.") by the following:

The parenthesized commalist of column names, if included, must not specify the same column twice; omitting that commalist -- the practice is not recommended -- is equivalent to including one that specifies all of the columns of the target table, in their left-to-right order within that table.

Page 113, last paragraph: Insert the following immediately before the sentence "The rows of T ... in the SET clause.":

The assignment-commalist must not include two assignments to the same column.

Page 160: Replace the first block of cp text on this page by the following:

 
SELECT DISTINCT SP.PNO, ( SELECT MAX ( SPX.QTY )
   FROM   SP AS SPX
   WHERE  SPX.PNO = SP.PNO 
   AND    SPX.SNO <> 'S1' ) AS XXX,
   ( SELECT MIN ( SPX.QTY )
   FROM   SP AS SPX
   WHERE  SPX.PNO = SP.PNO 
   AND    SPX.SNO <> 'S1' ) AS YYY
FROM   SP
WHERE  SP.SNO <> 'S1'

Page 161: Replace the sole block of cp text on this page by the following:

SELECT ZZZ AS PNO, ( SELECT MAX ( QTY )
     FROM   SP 
     WHERE  PNO = ZZZ 
     AND    SNO <> 'S1' ) AS XXX,
     ( SELECT MIN ( QTY )
     FROM   SP 
     WHERE  PNO = ZZZ 
     AND    SNO <> 'S1' ) AS YYY
FROM ( SELECT DISTINCT PNO AS ZZZ
     FROM   SP 
     WHERE  SNO <> 'S1' ) AS POINTLESS

Page 269, sentence beginnining "Observe" (immediately below first figure): The final period should be outside the closing parenthesis, not inside it.



ERRATA

The Persistent Stored Modules feature (PSM) was ratified in late 1996. As a consequence, the text of Appendix E requires a number of technical revisions and clarifications (most of them fairly minor in nature). The most significant are summarized below, with an indication of those pages primarily affected.

  • Passim: PSM parameter and SQL variable names do not include a colon prefix. References to names are resolved according to the sequence column (highest precedence), variable, parameter (lowest precedence).

  • Pages 465-466: Module definitions do not contain a LANGUAGE specification, routine definitions do. LANGUAGE SQL is the default.

  • Page 466: The prohibition against recursion described in the footnote is now in dispute.

  • Pages 467ff: The [NOT] DETERMINISTIC and READS or MODIFIES SQL DATA specifications (see pages 489-490) apply not only to external routines but to SQL routines as well.

  • Pages 469 and 480: SQL routines cannot contain SQL dynamic statements; server modules cannot contain temporary table, cursor, or dynamic cursor definitions.

  • Page 471: The situation discussed in the first bullet item (in which a PSM routine invocation appears in a DEFAULT clause) cannot occur.

  • Pages 481-482: PSM does include the FOR statement.

  • Page 483: SQL domains cannot be used to specify the data type of SQL variables, nor can statement labels be used as high-level qualifiers on references to such variables.

  • Page 491: The following are additional key words: CONDITION_IDENTIFIER, CONTAINS, PARAMETER_NAME, ROUTINE_CATALOG, ROUTINE_NAME, ROUTINE_SCHEMA, SPECIFIC_NAME. Of these, CONTAINS (only) is reserved. REDO is not a key word.

  • Page 492: CALL is the only preparable SQL control statement. FOR is transaction-initiating and LEAVE is not; the other statements are "possibly" transaction-initiating.

  • Page 493: Support for server modules is optional.

Submit Errata

More Information

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020