Hitachi

ノンストップデータベース HiRDB Version 10 SQLリファレンス


付録A.1 SQLの予約語

SQLには,ISOで「ISO 9075−1992 Database Language SQL」として規格された予約語(以降SQL92と呼びます)と,JISで「JIS X 3005-1990データベース言語SQL」として規格された予約語があります。HiRDBで使用する予約語は,JIS規格を基本にしています。

予約語は,SQL文で使用するキーワードとして登録されています。したがって,予約語を表や列の名称として定義できません。なお,予約語をSQL文中に使用する必要がある場合,引用符(")で囲んでください。予約語を引用符(")で囲むと,一般の文字列と同じようにSQL文で使用できます。

SQLの予約語を次の表に示します。

表中の凡例を次に示します。

○:予約語です。

−:予約語ではありません。

●:DatabaseMetaDataインタフェースのgetSQLKeywordsメソッドで返却されるキーワードです。

×:DatabaseMetaDataインタフェースのgetSQLKeywordsメソッドで返却されるキーワードではありません。

SQL92:ISO SQL 1992

SQL99:ISO SQL 1999

UNIFY:UNIFY2000

XDM/RD:XDM/RD E2

HiRDB(V6):HiRDB Version 6

HiRDB(V7):HiRDB Version 7

HiRDB(V8):HiRDB Version 8

HiRDB(V9):HiRDB Version 9

HiRDB(V10):HiRDB Version 10

JDBC:Type4 JDBCドライバのDatabaseMetaDataインタフェースのgetSQLKeywordsメソッド
表A‒1 SQLの予約語(A)

予約語

SQL92

SQL99

UNIFY

XDM/RD

HiRDB

(V6)

HiRDB

(V7)

HiRDB

(V8)

HiRDB

(V9)

HiRDB

(V10)

JDBC

ABS

ABSOLUTE

×

ACCESS

ACTION

×

ADD

×

ADMIN

×

AFTER

AGGREGATE

×

ALIAS

ALL

×

ALLOCATE

×

ALTER

×

AMOUNT

AND

×

ANDNOT

ANSI

ANY

×

ARE

×

ARRAY

AS

×

ASC

×

ASSERTION

×

ASSIGN

ASYNC

AT

×

AUTHORIZATION

×

AUTO

AVG

×

表A‒2 SQLの予約語(B)

予約語

SQL92

SQL99

UNIFY

XDM/RD

HiRDB

(V6)

HiRDB

(V7)

HiRDB

(V8)

HiRDB

(V9)

HiRDB

(V10)

JDBC

BASE

BEFORE

BEGIN

×

BETWEEN

×

BINARY

BIT

×

BIT_AND_TEST

BIT_LENGTH

×

BLOB

BOOLEAN

BOTH

×

BREADTH

BTREE

BUFFER

BY

×

BYTE

表A‒3 SQLの予約語(C)

予約語

SQL92

SQL99

UNIFY

XDM/RD

HiRDB

(V6)

HiRDB

(V7)

HiRDB

(V8)

HiRDB

(V9)

HiRDB

(V10)

JDBC

CALL

CASCADE

×

CASCADED

×

CASE

×

CAST

×

CATALOG

×

CHANGE

CHAR

×

CHARACTER

×

CHAR_LENGTH

×

CHARACTER_LENGTH

×

CHECK

×

CLASS

×

CLOB

×

CLOSE

×

CLUSTER

COALESCE

×

COLLATE

×

COLLATION

×

COLUMN

×

COLUMNS

COMMENT

COMMIT

×

COMPLETION

COMPRESSED

×

CONDITION

CONFIGURATION

CONNECT

×

CONNECTION

×

CONST

CONSTRAINT

×

CONSTRAINTS

×

CONSTRUCTOR

CONTIGUOUS

CONTINUE

×

CONVERT

×

CORR

×

CORRESPONDING

×

COUNT

×

COUNT_FLOAT

COVAR_POP

×

COVAR_SAMP

×

CREATE

×

CROSS

×

CUBE

×

CUME_DIST

×

CURAID

CURRENT

×

CURRENT_DATE

×

CURRENT_DEFAULT_TRANSFORM_GROUP

×

CURRENT_PATH

×

CURRENT_ROLL

×

CURRENT_TIME

×

CURRENT_TIMESTAMP

×

CURRENT_TRANSFORM_GROUP_FOR_TYPE

×

CURRENT_USER

×

CURSOR

×

CYCLE

表A‒4 SQLの予約語(D)

予約語

SQL92

SQL99

UNIFY

XDM/RD

HiRDB

(V6)

HiRDB

(V7)

HiRDB

(V8)

HiRDB

(V9)

HiRDB

(V10)

JDBC

DATA

DATABASE

DATE

×

DAY

×

DAYS

DBA

DEALLOCATE

×

DEC

×

DECIMAL

×

DECLARE

×

DEFAULT

×

DEFER

DEFERRABLE

×

DEFERRED

×

DELETE

×

DEMOTING

DENSE_RANK

×

DEPTH

DEREF

×

DESC

×

DESCRIBE

×

DESCRIPTION

×

DESCRIPTOR

×

DESTROY

×

DESTRUCTOR

×

DETERMINISTIC

×

DEVICE

DIAGNOSTICS

×

DICTIONARY

DIGITS

DIRECT

DISCONNECT

×

DISPLAY

×

DISTINCT

×

DO

DOMAIN

×

DOUBLE

×

DOUBLE_PRECISION

DROP

×

DYNAMIC

×

表A‒5 SQLの予約語(E)

予約語

SQL92

SQL99

UNIFY

XDM/RD

HiRDB

(V6)

HiRDB

(V7)

HiRDB

(V8)

HiRDB

(V9)

HiRDB

(V10)

JDBC

EACH

EDIT

ELSE

×

ELSEIF

ENCRYPT

END

×

END-EXEC

×

EQUALS

ESCAPE

×

ESTIMATED

EVERY

×

EXCEPT

×

EXCEPTION

×

EXCLUSIVE

EXEC

×

EXECUTE

×

EXISTS

×

EXIT

EXTERN

EXTERNAL

×

EXTRACT

×

表A‒6 SQLの予約語(F)

予約語

SQL92

SQL99

UNIFY

XDM/RD

HiRDB

(V6)

HiRDB

(V7)

HiRDB

(V8)

HiRDB

(V9)

HiRDB

(V10)

JDBC

FALSE

×

FETCH

×

FILE

FILTER

×

FIRST

×

FIX

FIXED

FLAT

FLOAT

×

FOR

×

FORCE

FOREIGN

×

FOUND

×

FREE

FROM

×

FULL

×

FUNCTION

表A‒7 SQLの予約語(G)

予約語

SQL92

SQL99

UNIFY

XDM/RD

HiRDB

(V6)

HiRDB

(V7)

HiRDB

(V8)

HiRDB

(V9)

HiRDB

(V10)

JDBC

GENERAL

GET

×

GET_JAVA_STORED_ROUTINE_SOURCE

GLOBAL

×

GO

×

GOTO

×

GRANT

×

GROUP

×

GROUPING

×

表A‒8 SQLの予約語(H)

予約語

SQL92

SQL99

UNIFY

XDM/RD

HiRDB

(V6)

HiRDB

(V7)

HiRDB

(V8)

HiRDB

(V9)

HiRDB

(V10)

JDBC

HANDLER

HASH

HAVING

×

HELP

HEX

HOST

×

HOUR

×

HOURS

HUGE

表A‒9 SQLの予約語(I)

予約語

SQL92

SQL99

UNIFY

XDM/RD

HiRDB

(V6)

HiRDB

(V7)

HiRDB

(V8)

HiRDB

(V9)

HiRDB

(V10)

JDBC

IDENTIFIED

IDENTITY

×

IF

IGNORE

IMMEDIATE

×

IN

×

INDEX

INDICATOR

×

INITIALIZE

×

INITIALLY

×

INNER

×

INOUT

INPUT

×

INSENSITIVE

×

INSERT

×

INT

×

INTEGER

×

INTERSECT

×

INTERVAL

×

INTO

×

IS

×

ISOLATION

×

IS_USER_CONTAINED_IN_HDS_GROUP

ITERATE

×

表A‒10 SQLの予約語(J)

予約語

SQL92

SQL99

UNIFY

XDM/RD

HiRDB

(V6)

HiRDB

(V7)

HiRDB

(V8)

HiRDB

(V9)

HiRDB

(V10)

JDBC

JOIN

×

表A‒11 SQLの予約語(K)

予約語

SQL92

SQL99

UNIFY

XDM/RD

HiRDB

(V6)

HiRDB

(V7)

HiRDB

(V8)

HiRDB

(V9)

HiRDB

(V10)

JDBC

KEY

×

表A‒12 SQLの予約語(L)

予約語

SQL92

SQL99

UNIFY

XDM/RD

HiRDB

(V6)

HiRDB

(V7)

HiRDB

(V8)

HiRDB

(V9)

HiRDB

(V10)

JDBC

LABEL

×

LANGUAGE

×

LARGE

LAST

×

LATERAL

×

LEADING

×

LEAVE

LEFT

×

LENGTH

LESS

LEVEL

×

LIKE

×

LIMIT

LINES

LINK

LIST

LOCAL

×

LOCALTIME

×

LOCALTIMESTAMP

×

LOCATOR

LOCK

LOCKS

LOGID

LOGNAME

LONG

LOOP

LOWER

×

表A‒13 SQLの予約語(M)

予約語

SQL92

SQL99

UNIFY

XDM/RD

HiRDB

(V6)

HiRDB

(V7)

HiRDB

(V8)

HiRDB

(V9)

HiRDB

(V10)

JDBC

MAP

×

MATCH

×

MAX

×

MAXUSAGES

MCHAR

MICROSECOND

×

MICROSECONDS

×

MIN

×

MINUTE

×

MINUTES

MOD

MODE

MODIFIES

×

MODIFY

MODULE

×

MONTH

×

MONTHS

MOVE

MVARCHAR

表A‒14 SQLの予約語(N)

予約語

SQL92

SQL99

UNIFY

XDM/RD

HiRDB

(V6)

HiRDB

(V7)

HiRDB

(V8)

HiRDB

(V9)

HiRDB

(V10)

JDBC

NAMES

×

NATIONAL

×

NATURAL

×

NCHAR

×

NCLOB

×

NESTING

×

NEW

NEXT

×

NO

×

NONE

NONLOCAL

×

NOT

×

NOWAIT

NULL

×

NULLABLE

NULLIF

×

NUMERIC

×

NVARCHAR

表A‒15 SQLの予約語(O)

予約語

SQL92

SQL99

UNIFY

XDM/RD

HiRDB

(V6)

HiRDB

(V7)

HiRDB

(V8)

HiRDB

(V9)

HiRDB

(V10)

JDBC

OBJECT

OCTET_LENGTH

×

OF

×

OFF

OFFSET

OID

OLD

ON

×

ONLY

×

OPEN

×

OPERATION

OPERATORS

OPTION

×

OPTIMIZE

OR

×

ORDER

×

ORDINALITY

×

OTHERS

OUT

OUTER

×

OUTPUT

×

OVER

−(2001年以降○に変更)

OVERFLOW

OVERLAPS

×

OVERWRITE

×

OWN

OWNER

×

表A‒16 SQLの予約語(P)

予約語

SQL92

SQL99

UNIFY

XDM/RD

HiRDB

(V6)

HiRDB

(V7)

HiRDB

(V8)

HiRDB

(V9)

HiRDB

(V10)

JDBC

PAD

×

PAGE

PARAMETER

×

PARAMETERS

PARTIAL

×

PARTITION

×

PARTITIONED

PATH

×

PCTFREE

PENDANT

PERCENT_RANK

×

PERCENTILE_CONT

×

PERCENTILE_DISC

×

PIC

PICTURE

POSITION

×

POSTFIX

×

PREALLOCATED

PRECISION

×

PREFERRED

PREFIX

×

PREORDER

PREPARE

×

PRESERVE

×

PRIMARY

×

PRIMLEGES

×

PRIOR

×

PRIVATE

PRIVILEGES

×

PROCEDURE

×

PROGRAM

PROTECTED

PUBLIC

×

PURGE

表A‒17 SQLの予約語(R)

予約語

SQL92

SQL99

UNIFY

XDM/RD

HiRDB

(V6)

HiRDB

(V7)

HiRDB

(V8)

HiRDB

(V9)

HiRDB

(V10)

JDBC

RANDOM

RANGE

×

RANK

×

RD

RDAREA

RDNODE

×

READ

×

READS

×

REAL

×

RECOMPILE

RECOVERABLE

RECOVERY

RECURSIVE

REDO

×

REF

REFERENCES

×

REFERENCING

REGLIKE

REGR_AVGX

×

REGR_AVGY

×

REGR_COUNT

×

REGR_INTERCEPT

×

REGR_R2

×

REGR_SLOPE

×

REGR_SXX

×

REGR_SXY

×

REGR_SYY

×

RELATIVE

×

RELEASE

RELEASING

RENAME

REPEAT

×

RESIGNAL

RESTART

RESTRICT

×

RESULT

×

RETURN

RETURNS

REVOKE

×

RIGHT

×

ROLE

ROLLBACK

×

ROLLUP

×

ROOT

ROUTINE

ROW

ROW_NUMBER

×

ROWID

ROWS

×

表A‒18 SQLの予約語(S)

予約語

SQL92

SQL99

UNIFY

XDM/RD

HiRDB

(V6)

HiRDB

(V7)

HiRDB

(V8)

HiRDB

(V9)

HiRDB

(V10)

JDBC

SAVEPOINT

SCALE

SCAN

SCATTERED

×

SCHEMA

×

SCHEMAS

SCOPE

SCROLL

×

SD

SEARCH

SECOND

×

SECONDS

SECTION

×

SEGMENT

SELECT

×

SENSITIVE

SEPARATE

SEPARATOR

SEQUENCE

SESSION

×

SESSION_USER

×

SET

×

SETS

×

SFLIKE

SHARE

SHLIKE

×

SHORT

SIGN

×

SIGNAL

SIMILAR

SIZE

×

SLOCK

SMALLFLT

SMALLINT

×

SOME

×

SPACE

×

SPECIFIC

×

SPECIFICTYPE

×

SPLIT

SQL

×

SQL_STANDARD

SQLCODE

×

SQLCODE_OF_LAST_CONDITION

SQLCODE_TYPE

SQLCOUNT

SQLDA

SQLERRM

SQLERRM_OF_LAST_CONDITION

SQLERRMC

SQLERRML

SQLERROR

×

SQLEXCEPTION

SQLNAME

SQLSTATE

×

SQLWARN

SQLWARNING

START

STATE

×

STATEMENT

×

STATIC

STDDEV_POP

×

STOP

STOPPING

STRUCTURE

SUBSTR

SUBSTRING

×

SUM

×

SUPPRESS

SYNONYM

SYSTEM_USER

×

表A‒19 SQLの予約語(T)

予約語

SQL92

SQL99

UNIFY

XDM/RD

HiRDB

(V6)

HiRDB

(V7)

HiRDB

(V8)

HiRDB

(V9)

HiRDB

(V10)

JDBC

TABLE

×

TABLES

×

TEMPORARY

×

TERMINATE

×

TEST

TEXT

THAN

×

THEN

×

THERE

TIME

×

TIMESTAMP

×

TIMESTAMP_FORMAT

TIMEZONE_HOUR

×

TIMEZONE_MINUTE

×

TO

×

TRAILING

×

TRANSACTION

×

TRANSLATE

×

TRANSLATION

×

TREAT

TRIGGER

TRIM

×

TRUE

×

TRUNCATE

×

TYPE

注※

ISO SQL 2008での予約語です。

表A‒20 SQLの予約語(U)

予約語

SQL92

SQL99

UNIFY

XDM/RD

HiRDB

(V6)

HiRDB

(V7)

HiRDB

(V8)

HiRDB

(V9)

HiRDB

(V10)

JDBC

UAMT

UBINBUF

UCHAR

UDATE

UHAMT

×

UHANT

UHDATE

UNBOUNDED

×

UNDER

UNDO

×

UNIFY_2000

UNION

×

UNIONALL

UNIQUE

×

UNKNOWN

×

UNLIMITED

UNLOCK

UNTIL

UNNEST

×

UPDATE

×

UPPER

×

USAGE

×

USE

USER

×

USER_GROUP

×

USER_LEVEL

×

USING

×

UTIME

UTXTBUF

表A‒21 SQLの予約語(V)

予約語

SQL92

SQL99

UNIFY

XDM/RD

HiRDB

(V6)

HiRDB

(V7)

HiRDB

(V8)

HiRDB

(V9)

HiRDB

(V10)

JDBC

VALUE

×

VALUES

×

VAR_POP

×

VAR_SAMP

×

VARCHAR

×

VARCHAR_FORMAT

VARIABLE

VARYING

×

VIEW

×

VIRTUAL

VISIBLE

VOLATILE

VOLUME

VOLUMES

表A‒22 SQLの予約語(W)

予約語

SQL92

SQL99

UNIFY

XDM/RD

HiRDB

(V6)

HiRDB

(V7)

HiRDB

(V8)

HiRDB

(V9)

HiRDB

(V10)

JDBC

WAIT

WHEN

×

WHENEVER

×

WHERE

×

WHILE

WINDOW

×

WITH

×

WITHIN

×

WITHOUT

WORK

×

WRITE

×

表A‒23 SQLの予約語(X)

予約語

SQL92

SQL99

UNIFY

XDM/RD

HiRDB

(V6)

HiRDB

(V7)

HiRDB

(V8)

HiRDB

(V9)

HiRDB

(V10)

JDBC

XLIKE

XLOCK

XML

XMLAGG

XMLEXISTS

XMLPARSE

XMLQUERY

XMLSERIALIZE

表A‒24 SQLの予約語(Y)

予約語

SQL92

SQL99

UNIFY

XDM/RD

HiRDB

(V6)

HiRDB

(V7)

HiRDB

(V8)

HiRDB

(V9)

HiRDB

(V10)

JDBC

YEAR

×

YEARS

表A‒25 SQLの予約語(Z)

予約語

SQL92

SQL99

UNIFY

XDM/RD

HiRDB

(V6)

HiRDB

(V7)

HiRDB

(V8)

HiRDB

(V9)

HiRDB

(V10)

JDBC

ZONE

×