Ingres 9.3 SQL Reference Guide

Ingres 9.3 SQL Reference Guide

Ingres® 9.3 SQL Reference Guide ING-93-SQL-06 This Documentation is for the end user's informational purposes only and may be subject to change or withdrawal by Ingres Corporation ("Ingres") at any time. This Documentation is the proprietary information of Ingres and is protected by the copyright laws of the United States and international treaties. It is not distributed under a GPL license. You may make printed or electronic copies of this Documentation provided that such copies are for your own internal use and all Ingres copyright notices and legends are affixed to each reproduced copy. You may publish or distribute this document, in whole or in part, so long as the document remains unchanged and is disseminated with the applicable Ingres software. Any such publication or distribution must be in the same manner and medium as that used by Ingres, e.g., electronic download via website with the software or on a CD­ ROM. Any other use, such as any dissemination of printed copies or use of this documentation, in whole or in part, in another publication, requires the prior written consent from an authorized representative of Ingres. To the extent permitted by applicable law, INGRES PROVIDES THIS DOCUMENTATION "AS IS" WITHOUT WARRANTY OF ANY KIND, INCLUDING WITHOUT LIMITATION, ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT. IN NO EVENT WILL INGRES BE LIABLE TO THE END USER OR ANY THIRD PARTY FOR ANY LOSS OR DAMAGE, DIRECT OR INDIRECT, FROM THE USER OF THIS DOCUMENTATION, INCLUDING WITHOUT LIMITATION, LOST PROFITS, BUSINESS INTERRUPTION, GOODWILL, OR LOST DATA, EVEN IF INGRES IS EXPRESSLY ADVISED OF SUCH LOSS OR DAMAGE. The manufacturer of this Documentation is Ingres Corporation. For government users, the Documentation is delivered with "Restricted Rights" as set forth in 48 C.F.R. Section 12.212, 48 C.F.R. Sections 52.227-19(c)(1) and (2) or DFARS Section 252.227-7013 or applicable successor provisions. Copyright © 2009 Ingres Corporation. All Rights Reserved. Ingres, OpenROAD, and EDBC are registered trademarks of Ingres Corporation. All other trademarks, trade names, service marks, and logos referenced herein belong to their respective companies. Contents Chapter 1: Introducing the SQL Reference Guide 29 In This Guide ...................................................................................................................... 29 Audience............................................................................................................................ 29 Enterprise Access Compatibility ............................................................................................. 29 System-specific Text in This Guide......................................................................................... 30 Terminology Used in This Guide............................................................................................. 30 Syntax Conventions Used in This Guide .................................................................................. 31 Chapter 2: Introducing SQL 33 SQL Functionality ................................................................................................................ 33 Types of SQL Statements ..................................................................................................... 33 Interactive and Embedded SQL ............................................................................................. 34 Interactive SQL ............................................................................................................. 34 Embedded SQL.............................................................................................................. 34 SQL Naming and Statement Rules ......................................................................................... 37 Object Naming Rules ...................................................................................................... 37 Regular and Delimited Identifiers ..................................................................................... 39 Statement Terminators................................................................................................... 43 Correlation Names............................................................................................................... 43 Correlation Name Rules .................................................................................................. 44 Database Procedures ........................................................................................................... 45 Determine Settings for a Database ................................................................................... 46 Object Management Extension .............................................................................................. 46 ANSI Compliance ................................................................................................................ 46 OpenSQL ........................................................................................................................... 46 Security Levels ................................................................................................................... 47 Chapter 3: Understanding SQL Data Types 49 SQL Data Types .................................................................................................................. 49 Character Data Types ..................................................................................................... 50 Unicode Data Types ....................................................................................................... 56 Numeric Data Types ....................................................................................................... 56 Date/Time Data Types .................................................................................................... 60 Abstract Data Types ....................................................................................................... 74 Binary Data Types.......................................................................................................... 78 Storage Formats of Data Types ............................................................................................. 82 Literals .............................................................................................................................. 84 Contents iii String Literals................................................................................................................ 84 Numeric Literals ............................................................................................................ 86 Date/Time Literals ......................................................................................................... 87 SQL Constants .................................................................................................................... 90 Nulls ................................................................................................................................. 91 Nulls and Comparisons ................................................................................................... 91 Nulls and Aggregate Functions ......................................................................................... 92 Nulls and Integrity Constraints......................................................................................... 93 Chapter 4: Understanding the Elements of SQL Statements 95 SQL Operators .................................................................................................................... 95 Arithmetic Operators ...................................................................................................... 96 Comparison Operators .................................................................................................... 96 Logical Operators........................................................................................................... 97 SQL Operations................................................................................................................... 98 String Concatenation Operations ...................................................................................... 98 Assignment Operations ................................................................................................... 99 Arithmetic Operations................................................................................................... 104 SQL Functions................................................................................................................... 113 Scalar Functions .......................................................................................................... 113 Aggregate Functions..................................................................................................... 142 IFNULL Function .......................................................................................................... 147 Universal Unique Identifier (UUID) ................................................................................. 148 Expressions in SQL ............................................................................................................ 152 Case Expressions ......................................................................................................... 152 Cast Expressions.........................................................................................................

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    866 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us