
SQL Reference Guide November 2004 Version 9.0 This manual describes syntax and semantics of SQL language statements and elements for the Dharma SDK. November, 2004 © 1987-2004 Dharma Systems, Inc. All rights reserved. Information in this document is subject to change without notice. Dharma Systems Inc. shall not be liable for any incidental, direct, special or consequential damages whatsoever arising out of or relating to this material, even if Dharma Systems Inc. has been advised, knew or should have known of the possibility of such damages. The software described in this manual is furnished under a license agreement or nondisclosure agreement. The soft- ware may be used or copied only in accordance with the terms of this agreement. It is against the law to copy this soft- ware on magnetic tape, disk or any other medium for any purpose other than for backup or archival purposes. This manual contains information protected by copyright. No part of this manual may be photocopied or reproduced in any form without prior written consent from Dharma Systems Inc. Use, duplication, or disclosure whatsoever by the Government shall be expressly subject to restrictions as set forth in subdivision (b)(3)(ii) for restricted rights in computer software and subdivision (b)(2) for limited rights in technical data, both as set in 52.227-7013. Dharma Systems welcomes your comments on this document and the software it describes. Send comments to: Documentation Comments Dharma Systems, Inc. Brookline Business Center. #55, Route 13 Brookline, NH 03033 Phone: 603-732-4001 Fax: 603-732-4003 Electronic Mail: [email protected] Web Page: http://www.dharma.com Dharma/SQL, Dharma AppLink, Dharma SDK, and Dharma Integrator are trademarks of Dharma Systems, Inc. The following are third-party trademarks: Microsoft is a registered trademark, and ODBC, Windows, Windows NT, Windows 95 and Windows 2000 are trade- marks of Microsoft Corporation. Oracle is a registered trademark of Oracle Corporation. Java, Java Development Kit, Solaris, SPARC, SunOS, and SunSoft are registered trademarks of Sun Microsystems, Inc. All other trademarks and registered trademarks are the property of their respective holders. Contents Introduction Purpose of This Guide . vii Audience. vii Structure . vii Syntax Diagram Conventions . viii Related Documentation . viii 1 SQL Language Elements 1.1 Introduction . 1-1 1.2 SQL Features: Professional Edition . 1-2 1.3 SQL Identifiers . 1-3 1.3.1 Conventional Identifiers. 1-3 1.3.2 Delimited Identifiers . 1-4 1.4 Data Types. 1-4 1.4.1 Character Data Types. 1-5 1.4.1.1 Specifying the Character Set for Character Data Types. 1-6 1.4.2 Exact Numeric Data Types . 1-9 1.4.2.1 Approximate Numeric Data Types. 1-10 1.4.3 Date-Time Data Types . 1-11 1.4.4 Bit String Data Types. 1-12 1.5 Query Expressions. 1-14 1.5.1 Inner Joins . 1-20 1.5.2 Outer Joins . 1-22 1.6 Search Conditions . 1-24 1.6.1 Logical Operators: OR, AND, NOT . 1-25 1.6.2 Relational Operators . 1-25 1.6.3 Basic Predicate. 1-26 1.6.4 Quantified Predicate. 1-26 1.6.5 BETWEEN Predicate. 1-27 1.6.6 NULL Predicate . 1-27 1.6.7 CONTAINS Predicate . 1-28 1.6.8 LIKE Predicate. 1-28 1.6.9 EXISTS Predicate . 1-29 1.6.10 IN Predicate . 1-29 1.6.11 Outer Join Predicate . 1-30 1.7 Expressions . 1-31 1.7.1 Concatenated Character Expressions . 1-32 1.7.2 Numeric Arithmetic Expressions. 1-33 1.7.3 Date Arithmetic Expressions . 1-34 1.7.4 Conditional Expressions . 1-35 1.8 Literals. 1-36 1.8.1 Numeric Literals . 1-36 1.8.2 Character String Literals . 1-36 1.8.3 Date-Time Literals . 1-37 1.8.3.1 Date Literals . 1-37 iii 1.8.3.2 Time Literals . .1-39 1.8.3.3 Timestamp Literals . 1-40 1.9 Date-Time Format Strings . 1-40 1.9.1 Date Format Strings . 1-41 1.9.2 Time Format Strings. 1-42 1.10 Functions . .1-43 1.10.1 Aggregate Functions. 1-43 1.10.1.1 AVG . .1-43 1.10.1.2 COUNT. .1-43 1.10.1.3 MAX . 1-44 1.10.1.4 MIN. 1-44 1.10.1.5 SUM . .1-45 1.10.2 Scalar Functions . .1-45 1.10.2.1 ABS function (ODBC compatible) . .1-45 1.10.2.2 ACOS function (ODBC compatible) . 1-46 1.10.2.3 ADD_MONTHS function (extension) . .1-46 1.10.2.4 ASCII function (ODBC compatible) . 1-47 1.10.2.5 ASIN function (ODBC compatible) . 1-47.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages178 Page
-
File Size-