Jump to main content
Product Documentation
Customer Support
HCL OneDB V 1.0.1.0
What's new in
HCL OneDB™
1.0.1.0
Getting Started
Installing
Administering
Security
Client APIs and tools
SQL programming
JSON compatibility
Extending
HCL OneDB™
Designing databases
Embedding
HCL OneDB™
Release information
Search
Home
SQL programming
You can use the
HCL OneDB™
implementation of the SQL language to develop applications for
HCL OneDB™
database servers.
Guide to SQL: Syntax
The
HCL OneDB™ Guide to SQL: Syntax
describes the syntax of the statements, data types, expressions, operators, and built-in functions of the
HCL OneDB™
dialect of the SQL language.
SPL statements
These topics describe Stored Procedure Language (
SPL
) statements, which you use to write SPL routines. You can store these routines in the database as user-defined routines (UDRs).
TRACE
TRACE OFF
SQL programming
You can use the
HCL OneDB™
implementation of the SQL language to develop applications for
HCL OneDB™
database servers.
Guide to SQL: Syntax
The
HCL OneDB™ Guide to SQL: Syntax
describes the syntax of the statements, data types, expressions, operators, and built-in functions of the
HCL OneDB™
dialect of the SQL language.
Overview of SQL syntax
These topics provide an overview about how to use the
SQL
statements,
SPL
statements, and syntax segments.
SQL statements
This chapter describes the syntax and semantics of SQL statements that are recognized by
HCL OneDB™
.
SPL statements
These topics describe Stored Procedure Language (
SPL
) statements, which you use to write SPL routines. You can store these routines in the database as user-defined routines (UDRs).
<<
Label
>> statement
Use the <<
label
>> statement of SPL to declare a statement label or a loop label.
CALL
CASE
Use the CASE statement when program execution needs to take exactly one among multiple branches, depending on the value of an SPL variable or of a simple expression. The CASE statement is a logical alternative to the IF statement.
CONTINUE
DEFINE
EXIT
FOR
FOREACH
Use the FOREACH statement to declare a direct cursor that can select and manipulate more than one row from a the result set of a query, or more than one element from a collection.
GOTO
IF
LET
LOOP
ON EXCEPTION
RAISE EXCEPTION
RETURN
SYSTEM
TRACE
TRACE ON
TRACE OFF
TRACE PROCEDURE
Displaying Expressions
Example Showing Different Forms of TRACE
Looking at the Traced Output
WHILE
Use the WHILE statement to establish a loop with variable end conditions.
Data types and expressions
These topics describe the data types and expressions that
HCL OneDB™
supports.
Other syntax segments
These topics describe
syntax segments
, which are language elements, such as database object names or optimizer directives, that appear as a subdiagram reference in the syntax diagrams of some SQL or SPL statements.
Built-in routines
Use build-in routines in SQL statements to perform specialized tasks.
Appendixes
Guide to SQL: Reference
The
HCL OneDB™ Guide to SQL: Reference
contains the reference information for the system catalog tables, data types, and environment variables of the
HCL OneDB™
dialect of the SQL language, as implemented in
HCL OneDB™
.
These topics also include information about the stores_demo, sales_demo, and superstore_demo databases that are included with
HCL OneDB™
.
Guide to SQL: Tutorial
The
HCL OneDB™
Guide to SQL: Tutorial
shows how to use basic and advanced structured query language (SQL) to access and manipulate the data in your databases.
It discusses the data manipulation language (DML) statements as well as triggers and stored procedure language (SPL) routines, which DML statements often use.
TRACE OFF
If you specify the keyword OFF, all tracing is turned off.