Preface
This manual describes the SQL syntax used for manipulating databases in Hitachi Advanced Database.
Note that, in this manual, and in the information output by the product (messages, command output results, and so on), HADB is often used in place of Hitachi Advanced Database.
- Organization of this preface
■ Intended readers
This manual is intended for:
-
Application developers
-
System engineers who design and set up HADB systems, and system administrators
Readers of this manual must have:
-
A basic knowledge of SQL
-
A basic knowledge of Java programming and a basic knowledge of JDBC (if you plan to create application programs in Java)
-
A basic knowledge of programming in C or C++ (if you plan to create application programs in C or C++)
-
A basic knowledge of ODBC (if you plan to create ODBC-compliant application programs)
■ Organization of this manual
This manual is organized into the following parts, chapters, and appendixes:
- 1. SELECT Statement Examples
-
Chapter 1 explains, using examples, how to write SELECT statements with constructs such as predicates, set functions, GROUP BY clauses, and HAVING clauses. Read this chapter to understand how to write basic SELECT statements.
- 2. List of SQL Statements
-
Chapter 2 provides a list of SQL statements that are supported by HADB, and explains how to read the SQL syntax specification format used in this manual.
- 3. Definition SQL
-
Chapter 3 describes the functions, specification formats, and rules of definition SQL statements.
- 4. Data Manipulation SQL
-
Chapter 4 describes the functions, specification formats, and rules of data manipulation SQL statements.
- 5. Control SQL
-
Chapter 5 describes the functions, specification formats, and rules of control SQL statements.
- 6. SQL Basics
-
Chapter 6 describes the basic elements of SQL, including rules for writing SQL statements, data types, and literals.
- 7. Constituent Elements
-
Chapter 7 describes query expressions, query specifications, predicates, value expressions, set functions, and other elements that comprise SQL.
- 8. Scalar Functions
-
Chapter 8 describes the functions, specification formats, and rules of scalar functions.
- A. SQL Reverse Lookup Reference
-
Appendix A explains SQL syntax organized by where it is used. This appendix provides a reverse lookup reference by which you can determine the SQL construct to use based on what you want to achieve.
- B. List of Functions
-
Appendix B lists the functions supported by HADB and where each is used.
■ Related publications
This manual is part of a related set of manuals. The manuals in the set are listed below (with the manual numbers):
-
Hitachi Advanced Database Setup and Operation Guide (3000-6-501(E))
-
Hitachi Advanced Database Application Development Guide (3000-6-502(E))
-
Hitachi Advanced Database Command Reference (3000-6-503(E))
-
Hitachi Advanced Database Messages (3000-6-505(E))
-
Hitachi Code Converter (for UNIX) (3020-7-358)#
-
HA Monitor Cluster Software Guide (for Linux(R) (x86) Systems) (3000-9-201(E))
-
For Public Cloud Systems HA Monitor Cluster Software Guide (3000-9-204)#
-
JP1 Version 11 JP1/Base User's Guide (3021-3-A01(E))
-
JP1 Version 11 JP1/Automatic Job Management System 3 System Design (Work Tasks) Guide (3021-3-B14(E))
-
JP1 Version 11 JP1/Audit Management - Manager Construction and Operation Guide (3021-3-A17)#
-
JP1 Version 12 JP1/Base User's Guide (3021-3-D65(E))
-
JP1 Version 12 JP1/Automatic Job Management System 3 System Design (Work Tasks) Guide (3021-3-D23(E))
#: These manuals have been published in Japanese only; they are not available in English.
In references to Hitachi Advanced Database manuals, this manual uses HADB in place of Hitachi Advanced Database.
Example: HADB Setup and Operation Guide
In references to the HA Monitor manual, this manual uses:
-
HA Monitor for Linux(R) (x86) in place of HA Monitor Cluster Software Guide (for Linux(R) (x86) Systems)
Example: HA Monitor for Linux(R) (x86)
-
HA Monitor for Public Cloud in place of For Public Cloud Systems HA Monitor Cluster Software Guide
Example: HA Monitor for Public Cloud
In references to the JP1/Base manual, this manual uses JP1/Base User's Guide in place of JP1 Version 11 JP1/Base User's Guide or JP1 Version 12 JP1/Base User's Guide.
Example: JP1/Base User's Guide
In references to the JP1/Automatic Job Management System 3 manual, this manual uses JP1/Automatic Job Management System 3 System Design (Work Tasks) Guide in place of JP1 Version 11 JP1/Automatic Job Management System 3 System Design (Work Tasks) Guide or JP1 Version 12 JP1/Automatic Job Management System 3 System Design (Work Tasks) Guide.
Example: JP1/Automatic Job Management System 3 System Design (Work Tasks) Guide
In references to the JP1/Audit manual, this manual uses JP1/Audit Construction and Operation Guide in place of JP1 Version 11 JP1/Audit Management - Manager Construction and Operation Guide.
Example: JP1/Audit Construction and Operation Guide
■ Conventions: Abbreviations for product names
This manual uses the following abbreviations for product names:
|
Abbreviation |
Full name or meaning |
|
|---|---|---|
|
HADB |
HADB server |
Hitachi Advanced Database |
|
HADB client |
Hitachi Advanced Database Client |
|
|
Linux |
RHEL 8 |
Red Hat Enterprise Linux Server 8 (64-bit x86_64) |
|
RHEL 9 |
Red Hat Enterprise Linux Server 9 (64-bit x86_64) |
|
|
RHEL 10 |
Red Hat Enterprise Linux Server 10 (64-bit x86_64) |
|
|
HDLM |
Hitachi Dynamic Link Manager Software |
|
|
Hitachi Code Converter |
Hitachi Code Converter - Runtime for C/COBOL (64) |
|
|
JP1/AJS3 |
Job Management Partner 1/Automatic Job Management System 3 |
|
|
JP1/Audit |
Job Management Partner 1/Audit Management - Manager |
|
■ Conventions: Acronyms
This manual also uses the following acronyms:
|
Acronym |
Full name or meaning |
|---|---|
|
AD |
Active Directory |
|
Amazon S3 |
Amazon Simple Storage Service |
|
APD |
Application Parameter Descriptor |
|
API |
Application Programming Interface |
|
ARD |
Application Row Descriptor |
|
AWS |
Amazon Web Services |
|
BI |
Business Intelligence |
|
BLOB |
Binary Large Object |
|
BNF |
Backus-Naur Form |
|
BOM |
Byte Order Mark |
|
CLI |
Call Level Interface |
|
CLOB |
Character Large Object |
|
CPU |
Central Processing Unit |
|
CSV |
Character-Separated Values |
|
DB |
Database |
|
DBMS |
Database Management System |
|
DMMP |
Device Mapper Multipath |
|
DNS |
Domain Name System |
|
DRBD |
Distributed Replicated Block Device |
|
EBS |
Amazon Elastic Block Store |
|
EC2 |
Amazon Elastic Compute Cloud |
|
EFS |
Amazon Elastic File System |
|
ELF |
Executable and Linking Format |
|
ER |
Entity Relationship |
|
HBA |
Host Bus Adapter |
|
HDD |
Hard Disk Drive |
|
ID |
Identification number |
|
IEF |
Integrity Enhancement Facility |
|
IP |
Internet Protocol |
|
IPD |
Implementation Parameter Descriptor |
|
IRD |
Implementation Row Descriptor |
|
JAR |
Java Archive File |
|
JDBC |
Java Database Connectivity |
|
JDK |
Java Developer's Kit |
|
JNDI |
Java Naming and Directory Interface |
|
JRE |
Java Runtime Environment |
|
JSON |
JavaScript Object Notation |
|
JTA |
Java Transaction API |
|
LDAP |
Lightweight Directory Access Protocol |
|
LOB |
Large Object |
|
LRU |
Least Recently Used |
|
LV |
Logical Volume |
|
LVM |
Logical Volume Manager |
|
LWP |
Light Weight Process |
|
MSDN |
Microsoft Developer Network |
|
NFS |
Network File System |
|
NIC |
Network Interface Card |
|
NTP |
Network Time Protocol |
|
ODBC |
Open Database Connectivity |
|
OS |
Operating System |
|
OSS |
Open Source Software |
|
PAM |
Pluggable Authentication Module |
|
PP |
Program Product |
|
PV |
Physical Volume |
|
PVC |
Persistent Volume Claim |
|
RAID |
Redundant Array of Independent Disks |
|
RDBMS |
Relational Database Management System |
|
SELinux |
Security-Enhanced Linux |
|
SSD |
Solid State Drive |
|
SSSD |
System Security Services Daemon |
|
TLB |
Translation Lookaside Buffer |
|
URI |
Uniform Resource Identifier |
|
URL |
Uniform Resource Locator |
|
UUID |
Universally Unique Identifier |
|
VG |
Volume Group |
|
VPC |
Amazon Virtual Private Cloud |
|
WWN |
World Wide Name |
|
XFS |
Extents File System |
■ Conventions: Fonts and symbols
The following table explains the fonts used in this manual:
|
Font |
Convention |
|---|---|
|
Bold |
Bold type indicates text on a window, other than the window title. Such text includes menus, menu options, buttons, radio box options, or explanatory labels. For example:
|
|
Italics |
Italics are used to indicate a placeholder for some actual text to be provided by the user or system. For example:
Italics are also used for emphasis. For example:
|
|
Code font |
A code font indicates text that the user enters without change, or text (such as messages) output by the system. For example:
|
The table below shows the symbols used in this manual for explaining commands and operands, such as the operands used in server definitions.
Note that these symbols are used for explanatory purposes only; do not specify them in the actual operand or command.
|
Symbol |
Meaning |
Example |
|---|---|---|
|
| |
In syntax explanations, a vertical bar separates multiple items, and has the meaning of OR. |
adb_sql_text_out = {Y|N} In this example, the vertical bar means that you can specify either Y or N. |
|
[ ] |
In syntax explanations, square brackets indicate that the enclosed item or items are optional. |
adbsql [-V] In this example, the square brackets mean that you can specify adbsql, or you can specify adbsql -V. |
|
{ } |
In syntax explanations, curly brackets indicate that only one of the enclosed items is to be selected. |
adbcancel {--ALL|-u connection-ID} In this example, the curly brackets mean that you can specify either --ALL or -u connection-ID. |
|
... |
In syntax explanations, an ellipsis (...) indicates that the immediately preceding item can be repeated as many times as necessary. |
adbbuff -n DB-area-name[, DB-area-name] ... In this example, the ellipsis means that you can specify DB-area-name as many times as necessary. |
|
{{ }} |
In syntax explanations, double curly brackets indicate that the enclosed items can be repeated as a single unit. |
{{adbinitdbarea -n data-DB-area-name}} In this example, the double curly brackets mean that you can specify adbinitdbarea -n data-DB-area-name as many times as necessary. |
|
X (underline) |
In syntax explanations, underlined characters indicate a default value. |
adb_import_errmsg_lv = {0|1} In this example, the underline means that the value 0 is assumed by HADB when the operand is omitted. |
|
~ |
A swung dash indicates that the text following it explains the properties of the specified value. |
adb_sys_max_users = maximum-number-of-concurrent-connections ~ <integer> ((1 to 1024)) <<10>> In this example, the text following the swung dash means that you can specify an integer in the range from 1 to 1024. If the operand is not specified, the value 10 is assumed by HADB. |
|
< > |
Single angle brackets explain the data type of the specified value. |
|
|
(( )) |
Double parentheses indicate the scope of the specified value. |
|
|
<< >> |
Double angle brackets indicate a default value. |
■ Conventions: Path names
-
$INSTDIR is used to indicate the server directory path (for installation).
-
$ADBDIR is used to indicate the server directory path (for operation).
-
$DBDIR is used to indicate the DB directory path.
-
%ADBCLTDIR% (for a Windows HADB client) or $ADBCLTDIR (for a Linux HADB client) is used to indicate the client directory path.
-
%ADBODBTRCPATH% is used to indicate the folder path where HADB's ODBC driver trace files are stored.
■ Conventions: Symbols used in mathematical formulas
The following table explains special symbols used by this manual in mathematical formulas:
|
Symbol |
Meaning |
|---|---|
|
↑ ↑ |
Round up the result to the next integer. Example: The result of ↑34 ÷ 3↑ is 12. |
|
↓ ↓ |
Discard digits following the decimal point. Example: The result of ↓34 ÷ 3↓ is 11. |
|
MAX |
Select the largest value as the result. Example: The result of MAX(3 × 6, 4 + 7) is 18. |
|
MIN |
Select the smallest value as the result. Example: The result of MIN(3 × 6, 4 + 7) is 11. |
■ Conventions: Syntax elements
|
Syntax element notation |
Meaning |
|---|---|
|
<path name> |
The following characters can be used in path names:
Note, however, that the characters that can be used might differ depending on the operating system. |
|
<OS path name> |
For an OS path name, all characters that can be used in a path name in the operating system can be used. For details about available characters, see the documentation for the operating system you are using. |
|
<character string> |
Any character string can be specified. |
|
<integer suffixed by the unit> |
Specify the value in a format consisting of a numeric character (in the range from 0 to 9) followed by a unit (MB (megabyte), GB (gigabyte), or TB (terabyte)). Do not enter a space between the numeric character and the unit.
|
■ Conventions: KB, MB, GB, TB, PB, and EB
This manual uses the following conventions:
-
1 KB (kilobyte) is 1,024 bytes.
-
1 MB (megabyte) is 1,0242 bytes.
-
1 GB (gigabyte) is 1,0243 bytes.
-
1 TB (terabyte) is 1,0244 bytes.
-
1 PB (petabyte) is 1,0245 bytes.
-
1 EB (exabyte) is 1,0246 bytes.
■ Conventions: Version numbers
The version numbers of Hitachi program products are usually written as two sets of two digits each, separated by a hyphen. For example:
-
Version 1.00 (or 1.0) is written as 01-00.
-
Version 2.05 is written as 02-05.
-
Version 2.50 (or 2.5) is written as 02-50.
-
Version 12.25 is written as 12-25.
The version number might be shown on the spine of a manual as Ver. 2.00, but the same version number would be written in the program as 02-00.
■ HADB database language acknowledgements
The interpretations and specifications developed by Hitachi, Ltd. for the HADB database language specifications described in this manual are based on the standards listed below. Along with citing the standards relevant to HADB database language specifications, we would like to take this opportunity to express our appreciation to the original developers of these standards.
-
JIS X 3005 Family of Standards: Information Technology - Database Languages - SQL
-
ISO/IEC 9075: Information Technology - Database Languages - SQL
- Note:
-
JIS: Japanese Industrial Standard
ISO: International Organization for Standardization
IEC: International Electrotechnical Commission