Preface
Purpose
Audience
Organization of This Manual
Typographical Conventions
Syntax Notation
How to Use This Manual
Other Useful Documentation
Getting Started
Development Tools
Database
SQL-92
Reference
SQL-92 Reference
Getting Started with SQL-92
Introduction to SQL
Review of Relational Database Components
SQL Statements
SQL-92 Language Elements
Considerations for Internationalization
Progress SQL Explorer
Starting SQL Explorer on Windows
Starting SQL Explorer in Character Mode
Connecting to a Database
Running a Single SQL-92 Statement
Running Multiple SQL-92 Statements
Saving SQL-92 Statements to a File
Running SQL-92 Statements from an Input File
Including Files Containing SQL-92 Statements into Statement History
Modifying SQL Explorer Properties
Running Windows SQL Explorer in Batch Mode
Typical Pattern of Use
Create a Table
Populate the Table
Execute Queries Against the Table
Drop the Table
Other Sources of Information
Progress Documentation
SQL Resources
SQL-92 Language Elements
Overview
Definitions of Language Elements
Language Elements and Internationalization
SQL-92 Identifiers
Conventional Identifiers
Delimited Identifiers
Data Types
Character Data Types
Exact Numeric Data Types
Approximate Numeric Data Types
Date-time Data Types
Bit String Data Types
Query Expressions
Query Specification
Set Operator
Joins
Inner Joins
Outer Joins
Search Conditions
Logical Operators: OR, AND, NOT
Relational Operators
Basic Predicate
Quantified Predicate
BETWEEN Predicate
NULL Predicate
LIKE Predicate
EXISTS Predicate
IN Predicate
OUTER JOIN Predicate
Expressions
Numeric Arithmetic Expressions
Date Arithmetic Expressions
Conditional Expressions
Literals
Numeric Literals
Character-String Literals
Date-time Literals
Date-time Format Strings
Date-format Strings
Time-format Strings
SQL-92 Statements
SQL-92 Statements
ALTER USER Statement
BEGIN-END DECLARE SECTION
CALL Statement
CLOSE Statement
Column Constraints
COMMIT Statement
CONNECT Statement
CREATE INDEX Statement
CREATE PROCEDURE Statement
CREATE SYNONYM Statement
CREATE TABLE Statement
CREATE TRIGGER Statement
CREATE USER Statement
CREATE VIEW Statement
DECLARE CURSOR Statement
DELETE Statement
DESCRIBE Statement
DESCRIBE BIND VARIABLES Statement
DESCRIBE SELECT LIST Statement
DISCONNECT Statement
DROP INDEX Statement
DROP PROCEDURE Statement
DROP SYNONYM Statement
DROP TABLE Statement
DROP TRIGGER Statement
DROP USER Statement
DROP VIEW Statement
EXEC SQL Delimiter
EXECUTE Statement
EXECUTE IMMEDIATE Statement
FETCH Statement
GET DIAGNOSTICS Statement
GET DIAGNOSTICS EXCEPTION Statement
GRANT Statement
INSERT Statement
LOCK TABLE Statement
OPEN Statement
PREPARE Statement
REVOKE Statement
ROLLBACK Statement
SELECT Statement
COLUMN_LIST Clause
FROM Clause
WHERE Clause
GROUP BY CLAUSE
HAVING CLAUSE
ORDER BY Clause
FOR UPDATE Clause
SET CONNECTION Statement
SET SCHEMA Statement
SET TRANSACTION ISOLATION LEVEL Statement
Table Constraints
UPDATE Statement
UPDATE STATISTICS Statement
WHENEVER Statement
SQL-92 Functions
SQL-92 Functions
AVG Function
COUNT Function
MAX Function
MIN Function
SUM Function
ABS Function
ACOS Function
ADD_MONTHS Function
ASCII Function
ASIN Function
ATAN Function
ATAN2 Function
CASE Function
CAST Function
CEILING Function
CHAR Function
CHR Function
COALESCE Function
CONCAT Function
CONVERT Function (ODBC Compatible)
CONVERT Function (Progress Extension)
COS Function
CURDATE Function
CURTIME Function
DATABASE Function
DAYNAME Function
DAYOFMONTH Function
DAYOFWEEK Function
DAYOFYEAR Function
DB_NAME Function
DECODE Function
DEGREES Function
EXP Function
FLOOR Function
GREATEST Function
HOUR FUNCTION
IFNULL Function
INITCAP Function
INSERT Function
INSTR Function
LAST_DAY Function
LCASE Function
LEAST Function
LEFT Function
LENGTH Function
LOCATE Function
LOG10 Function
LOWER Function
LPAD Function
LTRIM Function
MINUTE Function
MOD Function
MONTH Function
MONTHNAME Function
MONTHS_BETWEEN Function
NEXT_DAY Function
NOW Function
NULLIF Function
NVL Function
PI Function
POWER Function
PREFIX Function
PRO_* Functions
QUARTER Function
RADIANS Function
RAND Function
REPEAT Function
REPLACE Function
RIGHT Function
ROUND Function
ROWID Function
RPAD Function
RTRIM Function
SECOND Function
SIGN Function
SIN Function
SQRT Function
SUBSTR Function
SUBSTRING Function (ODBC Compatible)
SUFFIX Function
SYSDATE Function
SYSTIME Function
SYSTIMESTAMP Function
TAN Function
TO_CHAR Function
TO_DATE
TO_NUMBER Function
TO_TIME Function
TO_TIMESTAMP Function
TRANSLATE Function
UCASE Function
UPPER Function
USER Function
WEEK Function
YEAR Function
Java Stored Procedures and Triggers
Definitions of Java Stored Procedures and Triggers
Advantages of Stored Procedures
How Progress SQL-92 Interacts with Java
Creating Stored Procedures
Calling Stored Procedures
Using Stored Procedures
Stored Procedure Basics
What Is a Java Snippet?
Structure of Stored Procedures
Writing Stored Procedures
Invoking Stored Procedures
Modifying and Deleting Stored Procedures
Stored Procedure Security
Using the Progress SQL-92 Java Classes
Passing Values to SQL-92 Statements
Passing Values to and from Stored Procedures: Input and Output Parameters
Implicit Data Type Conversion Between SQL-92 and Java Types
Executing an SQL-92 Statement
Retrieving Data: the SQLCursor Class
Returning a Procedure Result Set to Applications: The RESULT Clause and DhSQLResultSet
Handling Null Values
Handling Errors
Calling Stored Procedures from Stored Procedures
INOUT and OUT Parameters When One Java Stored Procedure Calls Another
Using Triggers
Trigger Basics
Structure of Triggers
Triggers Versus Stored Procedures Versus Constraints
Typical Uses for Triggers
OLDROW and NEWROW Objects: Passing Values to Triggers
Java Class Reference
Java Class Reference
DhSQLException
DhSQLException.getDiagnostics
DhSQLResultSet
DhSQLResultSet.insert
DhSQLResultSet.makeNULL
DhSQLResultSet.set
SQLCursor
SQLCursor.close
SQLCursor.fetch
SQLCursor.found
SQLCursor.getParam
SQLCursor.getValue
SQLCursor.makeNULL
SQLCursor.open
SQLCursor.registerOutParam
SQLCursor.rowCount
SQLCursor.setParam
SQLCursor.wasNULL
SQLIStatement
SQLIStatement.execute
SQLIStatement.makeNULL
SQLIStatement.rowCount
SQLIStatement.setParam
SQLPStatement
SQLPStatement.execute
SQLPStatement.makeNULL
SQLPStatement.rowCount
SQLPStatement.setParam
Progress SQL-92 Reference Information
Progress SQL-92 Reserved Words
Progress SQL-92 System Limits
Progress SQL-92 Error Messages
Overview
Error Codes, SQLSTATE Values, and Messages
Progress SQL-92 System Catalog Tables
Overview of System Catalog Tables
SYSTABLES Core SystemTable
SYSCOLUMNS Core SystemTable
SYSINDEXES Core SystemTable
SYSCALCTABLE System Table
SYSCHARSTAT System Table
SYSCOLAUTH System Table
SYSCOLSTAT System Table
SYSCOLUMNS_FULL System Table
SYSDATATYPES System Table
SYSDATESTAT System Table
SYSDBAUTH System Table
SYSFLOATSTAT System Table
SYSIDXSTAT System Table
SYSINTSTAT System Table
SYSNUMSTAT System Table
SYSPROCBIN System Table
SYSPROCCOLUMNS System Table
SYSPROCEDURES System Table
SYSPROCTEXT System Table
SYSREALSTAT System Table
SYSSMINTSTAT System Table
SYSSYNONYMS System Table
SYSTABAUTH System Table
SYSTABLES_FULL System Table
SYSTBLSTAT System Table
SYSTIMESTAT System Table
SYSTINYINTSTAT System Table
SYSTRIGCOLS System Table
SYSTRIGGER System Table
SYSTSSTAT System Table
SYSVARCHARSTAT System Table
SYSVIEWS System Table
SYS_CHKCOL_USAGE System Table
SYS_CHK_CONSTRS System Table
SYS_KEYCOL_USAGE System Table
SYS_REF_CONSTRS System Table
SYS_TBL_CONSTRS System Table
Data Type Compatibility Issues with Previous Versions of Progress
Supported Data Types and Corresponding SQL-92 Data Types
Support for the ARRAY Data Type
Overview
PRO_ELEMENT Function
PRO_ARR_ESCAPE Function
PRO_ARR_DESCAPE Function
Unsubscripted Array References
Unsubscripted Array Updates and Inserts
Progress SQL-92 Elements and Statements in Backus Naur Form (BNF)
Data Types Syntax in BNF
DATA TYPE
Expressions Syntax in BNF
EXPRESSION (expr)
CONDITIONAL EXPRESSION
Literals Syntax in BNF
DATETIME LITERAL Syntax
Query Expressions Syntax in BNF
QUERY EXPRESSION
Search Conditions Syntax in BNF
Statements, DDL and DML Syntax in BNF
Compliance with Industry Standards
Scalar Functions
SQL-92 DDL and DML Statements
Glossary
Index