Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
9d5f18b5
提交
9d5f18b5
authored
8月 06, 2009
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Reformatted
上级
3d73ab4b
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
296 行增加
和
177 行删除
+296
-177
help.csv
h2/src/docsrc/help/help.csv
+296
-177
没有找到文件。
h2/src/docsrc/help/help.csv
浏览文件 @
9d5f18b5
...
@@ -51,8 +51,8 @@ DELETE FROM TEST WHERE ID=2
...
@@ -51,8 +51,8 @@ DELETE FROM TEST WHERE ID=2
"Commands (DML)","BACKUP","
"Commands (DML)","BACKUP","
BACKUP TO fileNameString
BACKUP TO fileNameString
","
","
Backs up the database files to a .zip file. Objects are not locked.
Admin
Backs up the database files to a .zip file. Objects are not locked.
rights are required to execute this command.
Admin
rights are required to execute this command.
","
","
BACKUP TO 'backup.zip'
BACKUP TO 'backup.zip'
"
"
...
@@ -99,7 +99,9 @@ case sensitive and can contain spaces.
...
@@ -99,7 +99,9 @@ case sensitive and can contain spaces.
The compression algorithm must match the one used when creating the script. When
The compression algorithm must match the one used when creating the script. When
using encryption, only DEFLATE and LZF are supported (LZF is faster but uses more space).
using encryption, only DEFLATE and LZF are supported (LZF is faster but uses more space).
Instead of a file, an URL may be used. Admin rights are required to execute this command.
Instead of a file, an URL may be used.
Admin rights are required to execute this command.
","
","
RUNSCRIPT FROM 'backup'
RUNSCRIPT FROM 'backup'
"
"
...
@@ -141,7 +143,8 @@ SHOW TABLES
...
@@ -141,7 +143,8 @@ SHOW TABLES
"Commands (DDL)","ALTER INDEX RENAME","
"Commands (DDL)","ALTER INDEX RENAME","
ALTER INDEX indexName RENAME TO newIndexName
ALTER INDEX indexName RENAME TO newIndexName
","
","
Renames an index. This command commits an open transaction.
Renames an index.
This command commits an open transaction.
","
","
ALTER INDEX IDXNAME RENAME TO IDX_TEST_NAME
ALTER INDEX IDXNAME RENAME TO IDX_TEST_NAME
"
"
...
@@ -149,8 +152,8 @@ ALTER INDEX IDXNAME RENAME TO IDX_TEST_NAME
...
@@ -149,8 +152,8 @@ ALTER INDEX IDXNAME RENAME TO IDX_TEST_NAME
"Commands (DDL)","ALTER SEQUENCE","
"Commands (DDL)","ALTER SEQUENCE","
ALTER SEQUENCE sequenceName [RESTART WITH long] [INCREMENT BY long]
ALTER SEQUENCE sequenceName [RESTART WITH long] [INCREMENT BY long]
","
","
Changes the next value and the increment of a sequence.
This command does not
Changes the next value and the increment of a sequence.
commit the current transaction; however the new value is used by other
This command does not
commit the current transaction; however the new value is used by other
transactions immediately, and rolling back this command has no effect.
transactions immediately, and rolling back this command has no effect.
","
","
ALTER SEQUENCE SEQ_ID RESTART WITH 1000
ALTER SEQUENCE SEQ_ID RESTART WITH 1000
...
@@ -160,7 +163,8 @@ ALTER SEQUENCE SEQ_ID RESTART WITH 1000
...
@@ -160,7 +163,8 @@ ALTER SEQUENCE SEQ_ID RESTART WITH 1000
ALTER TABLE tableName ADD name dataType [DEFAULT expression]
ALTER TABLE tableName ADD name dataType [DEFAULT expression]
[[NOT] NULL] [AUTO_INCREMENT | IDENTITY] [BEFORE columnName]
[[NOT] NULL] [AUTO_INCREMENT | IDENTITY] [BEFORE columnName]
","
","
Adds a new column to a table. This command commits an open transaction.
Adds a new column to a table.
This command commits an open transaction.
","
","
ALTER TABLE TEST ADD CREATEDATE TIMESTAMP
ALTER TABLE TEST ADD CREATEDATE TIMESTAMP
"
"
...
@@ -180,8 +184,8 @@ ALTER TABLE TEST ADD CONSTRAINT NAME_UNIQUE UNIQUE(NAME)
...
@@ -180,8 +184,8 @@ ALTER TABLE TEST ADD CONSTRAINT NAME_UNIQUE UNIQUE(NAME)
ALTER TABLE tableName ALTER COLUMN columnName dataType
ALTER TABLE tableName ALTER COLUMN columnName dataType
[DEFAULT expression] [NOT [NULL]] [AUTO_INCREMENT | IDENTITY]
[DEFAULT expression] [NOT [NULL]] [AUTO_INCREMENT | IDENTITY]
","
","
Changes the data type of a column.
The operation fails if the data can not be
Changes the data type of a column.
converted.
The operation fails if the data can not be
converted.
This command commits an open transaction.
This command commits an open transaction.
","
","
ALTER TABLE TEST ALTER COLUMN NAME CLOB
ALTER TABLE TEST ALTER COLUMN NAME CLOB
...
@@ -190,7 +194,8 @@ ALTER TABLE TEST ALTER COLUMN NAME CLOB
...
@@ -190,7 +194,8 @@ ALTER TABLE TEST ALTER COLUMN NAME CLOB
"Commands (DDL)","ALTER TABLE ALTER COLUMN RENAME","
"Commands (DDL)","ALTER TABLE ALTER COLUMN RENAME","
ALTER TABLE tableName ALTER COLUMN columnName RENAME TO name
ALTER TABLE tableName ALTER COLUMN columnName RENAME TO name
","
","
Renames a column. This command commits an open transaction.
Renames a column.
This command commits an open transaction.
","
","
ALTER TABLE TEST ALTER COLUMN NAME RENAME TO TEXT
ALTER TABLE TEST ALTER COLUMN NAME RENAME TO TEXT
"
"
...
@@ -282,7 +287,8 @@ ALTER TABLE TEST SET REFERENTIAL_INTEGRITY FALSE
...
@@ -282,7 +287,8 @@ ALTER TABLE TEST SET REFERENTIAL_INTEGRITY FALSE
"Commands (DDL)","ALTER TABLE RENAME","
"Commands (DDL)","ALTER TABLE RENAME","
ALTER TABLE tableName RENAME TO newName
ALTER TABLE tableName RENAME TO newName
","
","
Renames a table. This command commits an open transaction.
Renames a table.
This command commits an open transaction.
","
","
ALTER TABLE TEST RENAME TO MY_DATA
ALTER TABLE TEST RENAME TO MY_DATA
"
"
...
@@ -290,8 +296,10 @@ ALTER TABLE TEST RENAME TO MY_DATA
...
@@ -290,8 +296,10 @@ ALTER TABLE TEST RENAME TO MY_DATA
"Commands (DDL)","ALTER USER ADMIN","
"Commands (DDL)","ALTER USER ADMIN","
ALTER USER userName ADMIN {TRUE | FALSE}
ALTER USER userName ADMIN {TRUE | FALSE}
","
","
Switches the admin flag of a user on or off. Only unquoted or uppercase user
Switches the admin flag of a user on or off.
names are allowed. Admin rights are required to execute this command.
Only unquoted or uppercase user names are allowed.
Admin rights are required to execute this command.
This command commits an open transaction.
This command commits an open transaction.
","
","
ALTER USER TOM ADMIN TRUE
ALTER USER TOM ADMIN TRUE
...
@@ -300,8 +308,10 @@ ALTER USER TOM ADMIN TRUE
...
@@ -300,8 +308,10 @@ ALTER USER TOM ADMIN TRUE
"Commands (DDL)","ALTER USER RENAME","
"Commands (DDL)","ALTER USER RENAME","
ALTER USER userName RENAME TO newUserName
ALTER USER userName RENAME TO newUserName
","
","
Renames a user. Only unquoted or uppercase user names are allowed. After
Renames a user.
renaming a user, the password becomes invalid and needs to be changed as well.
After renaming a user, the password becomes invalid and needs to be changed as well.
Only unquoted or uppercase user names are allowed.
Admin rights are required to execute this command.
Admin rights are required to execute this command.
This command commits an open transaction.
This command commits an open transaction.
","
","
...
@@ -311,10 +321,12 @@ ALTER USER TOM RENAME TO THOMAS
...
@@ -311,10 +321,12 @@ ALTER USER TOM RENAME TO THOMAS
"Commands (DDL)","ALTER USER SET PASSWORD","
"Commands (DDL)","ALTER USER SET PASSWORD","
ALTER USER userName SET {PASSWORD string | SALT bytes HASH bytes}
ALTER USER userName SET {PASSWORD string | SALT bytes HASH bytes}
","
","
Changes the password of a user. Only unquoted or uppercase user names are
Changes the password of a user.
allowed. The password must be enclosed in single quotes. It is case sensitive
Only unquoted or uppercase user names are allowed.
and can contain spaces. The salt and hash values are hex strings. Admin rights
The password must be enclosed in single quotes. It is case sensitive
are required to execute this command.
and can contain spaces. The salt and hash values are hex strings.
Admin rights are required to execute this command.
This command commits an open transaction.
This command commits an open transaction.
","
","
ALTER USER SA SET PASSWORD 'rioyxlgt'
ALTER USER SA SET PASSWORD 'rioyxlgt'
...
@@ -349,8 +361,9 @@ COMMENT ON { { TABLE | VIEW | CONSTANT | CONSTRAINT | ALIAS | INDEX | ROLE
...
@@ -349,8 +361,9 @@ COMMENT ON { { TABLE | VIEW | CONSTANT | CONSTRAINT | ALIAS | INDEX | ROLE
| SCHEMA | SEQUENCE | TRIGGER | USER | DOMAIN } [schemaName.]objectName }
| SCHEMA | SEQUENCE | TRIGGER | USER | DOMAIN } [schemaName.]objectName }
| { COLUMN [schemaName.]tableName.columnName } IS expression
| { COLUMN [schemaName.]tableName.columnName } IS expression
","
","
Sets the comment of a database object. Use NULL to remove the comment. Admin
Sets the comment of a database object. Use NULL to remove the comment.
rights are required to execute this command.
Admin rights are required to execute this command.
This command commits an open transaction.
This command commits an open transaction.
","
","
COMMENT ON TABLE TEST IS 'Table used for testing'
COMMENT ON TABLE TEST IS 'Table used for testing'
...
@@ -361,7 +374,9 @@ CREATE AGGREGATE [IF NOT EXISTS] newAggregateName FOR className
...
@@ -361,7 +374,9 @@ CREATE AGGREGATE [IF NOT EXISTS] newAggregateName FOR className
","
","
Creates a new user-defined aggregate function. The method name must be the full
Creates a new user-defined aggregate function. The method name must be the full
qualified class name. The class must implement the interface
qualified class name. The class must implement the interface
org.h2.api.AggregateFunction. Admin rights are required to execute this command.
org.h2.api.AggregateFunction.
Admin rights are required to execute this command.
This command commits an open transaction.
This command commits an open transaction.
","
","
CREATE AGGREGATE MEDIAN FOR ""com.acme.db.Median""
CREATE AGGREGATE MEDIAN FOR ""com.acme.db.Median""
...
@@ -377,12 +392,12 @@ and method name, and may optionally include the parameter classes as in
...
@@ -377,12 +392,12 @@ and method name, and may optionally include the parameter classes as in
must both be public, and the method must be static.
must both be public, and the method must be static.
Deterministic functions always return the same value for the same parameters.
Deterministic functions always return the same value for the same parameters.
Admin rights are required to execute this command. If the first parameter of the
If the first parameter of the Java function is a java.sql.Connection, then a
Java function is a java.sql.Connection, then a connection to the database is
connection to the database is provided. This connection must not be closed.
provided. This connection must not be closed. If the class contains multiple
If the class contains multiple methods with the given name but different
methods with the given name but different parameter count, all methods are
parameter count, all methods are mapped.
mapped.
Admin rights are required to execute this command.
This command commits an open transaction.
This command commits an open transaction.
","
","
CREATE ALIAS MY_SQRT FOR ""java.lang.Math.sqrt"";
CREATE ALIAS MY_SQRT FOR ""java.lang.Math.sqrt"";
...
@@ -394,7 +409,8 @@ CALL GET_SYSTEM_PROPERTY('com.acme.test', 'true');
...
@@ -394,7 +409,8 @@ CALL GET_SYSTEM_PROPERTY('com.acme.test', 'true');
"Commands (DDL)","CREATE CONSTANT","
"Commands (DDL)","CREATE CONSTANT","
CREATE CONSTANT [IF NOT EXISTS] newConstantName VALUE expression
CREATE CONSTANT [IF NOT EXISTS] newConstantName VALUE expression
","
","
Creates a new constant. This command commits an open transaction.
Creates a new constant.
This command commits an open transaction.
","
","
CREATE CONSTANT ONE VALUE 1
CREATE CONSTANT ONE VALUE 1
"
"
...
@@ -416,7 +432,8 @@ CREATE DOMAIN EMAIL AS VARCHAR(255) CHECK (POSITION('@', VALUE) > 1)
...
@@ -416,7 +432,8 @@ CREATE DOMAIN EMAIL AS VARCHAR(255) CHECK (POSITION('@', VALUE) > 1)
CREATE {[UNIQUE [HASH]] INDEX [IF NOT EXISTS] newIndexName
CREATE {[UNIQUE [HASH]] INDEX [IF NOT EXISTS] newIndexName
| PRIMARY KEY [HASH]} ON tableName(indexColumn [,...])
| PRIMARY KEY [HASH]} ON tableName(indexColumn [,...])
","
","
Creates a new index. This command commits an open transaction.
Creates a new index.
This command commits an open transaction.
","
","
CREATE INDEX IDXNAME ON TEST(NAME)
CREATE INDEX IDXNAME ON TEST(NAME)
"
"
...
@@ -438,9 +455,9 @@ used instead of the original table name, the table is read only.
...
@@ -438,9 +455,9 @@ used instead of the original table name, the table is read only.
To use JNDI to get the connection, the driver class must be a
To use JNDI to get the connection, the driver class must be a
javax.naming.Context (for example javax.naming.InitialContext), and the URL must
javax.naming.Context (for example javax.naming.InitialContext), and the URL must
be the resource name (for example java:comp/env/jdbc/Test). Admin rights are
be the resource name (for example java:comp/env/jdbc/Test).
required to execute this command.
Admin rights are required to execute this command.
This command commits an open transaction.
This command commits an open transaction.
","
","
CREATE LINKED TABLE LINK('org.h2.Driver', 'jdbc:h2:test2', 'sa', 'sa', 'TEST');
CREATE LINKED TABLE LINK('org.h2.Driver', 'jdbc:h2:test2', 'sa', 'sa', 'TEST');
...
@@ -453,7 +470,8 @@ CREATE LINKED TABLE LINK('javax.naming.InitialContext',
...
@@ -453,7 +470,8 @@ CREATE LINKED TABLE LINK('javax.naming.InitialContext',
"Commands (DDL)","CREATE ROLE","
"Commands (DDL)","CREATE ROLE","
CREATE ROLE [IF NOT EXISTS] newRoleName
CREATE ROLE [IF NOT EXISTS] newRoleName
","
","
Creates a new role. This command commits an open transaction.
Creates a new role.
This command commits an open transaction.
","
","
CREATE ROLE READONLY
CREATE ROLE READONLY
"
"
...
@@ -477,6 +495,8 @@ Creates a new sequence. The data type of a sequence is BIGINT. Used values are
...
@@ -477,6 +495,8 @@ Creates a new sequence. The data type of a sequence is BIGINT. Used values are
never re-used, even when the transaction is rolled back. The cache is the number
never re-used, even when the transaction is rolled back. The cache is the number
of pre-allocated numbers. If the system crashes without closing the database, at
of pre-allocated numbers. If the system crashes without closing the database, at
most this many numbers are lost. The default cache size is 32.
most this many numbers are lost. The default cache size is 32.
This command commits an open transaction.
","
","
CREATE SEQUENCE SEQ_ID
CREATE SEQUENCE SEQ_ID
"
"
...
@@ -530,11 +550,11 @@ CREATE USER [IF NOT EXISTS] newUserName
...
@@ -530,11 +550,11 @@ CREATE USER [IF NOT EXISTS] newUserName
{PASSWORD string | SALT bytes HASH bytes}
{PASSWORD string | SALT bytes HASH bytes}
[ADMIN]
[ADMIN]
","
","
Creates a new user. Admin rights are required to execute this command. For
Creates a new user. For compatibility, only unquoted or uppercase user names are allowed.
compatibility, only unquoted or uppercase user names are allowed. The password
The password must be in single quotes. It is case sensitive and can contain spaces.
must be in single quotes. It is case sensitive and can contain spaces. The salt
The salt and hash values are hex strings.
and hash values are hex strings.
Admin rights are required to execute this command.
This command commits an open transaction.
This command commits an open transaction.
","
","
CREATE USER GUEST PASSWORD 'abc'
CREATE USER GUEST PASSWORD 'abc'
...
@@ -545,9 +565,9 @@ CREATE [FORCE] VIEW [IF NOT EXISTS] newViewName [(columnName [,..])]
...
@@ -545,9 +565,9 @@ CREATE [FORCE] VIEW [IF NOT EXISTS] newViewName [(columnName [,..])]
AS select
AS select
","
","
Creates a new view. If the force option is used, then the view is created even
Creates a new view. If the force option is used, then the view is created even
if the underlying table(s) don't exist. Admin rights are required to execute
if the underlying table(s) don't exist.
this command.
Admin rights are required to execute this command.
This command commits an open transaction.
This command commits an open transaction.
","
","
CREATE VIEW TEST_VIEW AS SELECT * FROM TEST WHERE ID < 100
CREATE VIEW TEST_VIEW AS SELECT * FROM TEST WHERE ID < 100
...
@@ -556,8 +576,9 @@ CREATE VIEW TEST_VIEW AS SELECT * FROM TEST WHERE ID < 100
...
@@ -556,8 +576,9 @@ CREATE VIEW TEST_VIEW AS SELECT * FROM TEST WHERE ID < 100
"Commands (DDL)","DROP AGGREGATE","
"Commands (DDL)","DROP AGGREGATE","
DROP AGGREGATE [IF EXISTS] aggregateName
DROP AGGREGATE [IF EXISTS] aggregateName
","
","
Drops an existing user-defined aggregate function. Admin rights are required to
Drops an existing user-defined aggregate function.
execute this command.
Admin rights are required to execute this command.
This command commits an open transaction.
This command commits an open transaction.
","
","
CREATE AGGREGATE MEDIAN
CREATE AGGREGATE MEDIAN
...
@@ -566,8 +587,9 @@ CREATE AGGREGATE MEDIAN
...
@@ -566,8 +587,9 @@ CREATE AGGREGATE MEDIAN
"Commands (DDL)","DROP ALIAS","
"Commands (DDL)","DROP ALIAS","
DROP ALIAS [IF EXISTS] functionAliasName
DROP ALIAS [IF EXISTS] functionAliasName
","
","
Drops an existing function alias. Admin rights are required to execute this
Drops an existing function alias.
command.
Admin rights are required to execute this command.
This command commits an open transaction.
This command commits an open transaction.
","
","
CREATE ALIAS MY_SQRT
CREATE ALIAS MY_SQRT
...
@@ -580,7 +602,9 @@ Drops all existing views, tables, sequences, schemas, function aliases, roles,
...
@@ -580,7 +602,9 @@ Drops all existing views, tables, sequences, schemas, function aliases, roles,
user-defined aggregate functions, domains, and users (except the current user).
user-defined aggregate functions, domains, and users (except the current user).
If DELETE FILES is specified, the database files will be removed when the last
If DELETE FILES is specified, the database files will be removed when the last
user disconnects from the database. Warning: this command can not be rolled
user disconnects from the database. Warning: this command can not be rolled
back. Admin rights are required to execute this command.
back.
Admin rights are required to execute this command.
","
","
DROP ALL OBJECTS
DROP ALL OBJECTS
"
"
...
@@ -588,7 +612,8 @@ DROP ALL OBJECTS
...
@@ -588,7 +612,8 @@ DROP ALL OBJECTS
"Commands (DDL)","DROP CONSTANT","
"Commands (DDL)","DROP CONSTANT","
DROP CONSTANT [IF EXISTS] constantName
DROP CONSTANT [IF EXISTS] constantName
","
","
Drops a constant. This command commits an open transaction.
Drops a constant.
This command commits an open transaction.
","
","
DROP CONSTANT ONE
DROP CONSTANT ONE
"
"
...
@@ -596,7 +621,8 @@ DROP CONSTANT ONE
...
@@ -596,7 +621,8 @@ DROP CONSTANT ONE
"Commands (DDL)","DROP DOMAIN","
"Commands (DDL)","DROP DOMAIN","
DROP DOMAIN [IF EXISTS] domainName
DROP DOMAIN [IF EXISTS] domainName
","
","
Drops a data type (domain). This command commits an open transaction.
Drops a data type (domain).
This command commits an open transaction.
","
","
DROP DOMAIN EMAIL
DROP DOMAIN EMAIL
"
"
...
@@ -604,7 +630,8 @@ DROP DOMAIN EMAIL
...
@@ -604,7 +630,8 @@ DROP DOMAIN EMAIL
"Commands (DDL)","DROP INDEX","
"Commands (DDL)","DROP INDEX","
DROP INDEX [IF EXISTS] indexName
DROP INDEX [IF EXISTS] indexName
","
","
Drops an index. This command commits an open transaction.
Drops an index.
This command commits an open transaction.
","
","
DROP INDEX IF EXISTS IDXNAME
DROP INDEX IF EXISTS IDXNAME
"
"
...
@@ -612,7 +639,8 @@ DROP INDEX IF EXISTS IDXNAME
...
@@ -612,7 +639,8 @@ DROP INDEX IF EXISTS IDXNAME
"Commands (DDL)","DROP ROLE","
"Commands (DDL)","DROP ROLE","
DROP ROLE [IF EXISTS] roleName
DROP ROLE [IF EXISTS] roleName
","
","
Drops a role. This command commits an open transaction.
Drops a role.
This command commits an open transaction.
","
","
DROP ROLE READONLY
DROP ROLE READONLY
"
"
...
@@ -620,7 +648,8 @@ DROP ROLE READONLY
...
@@ -620,7 +648,8 @@ DROP ROLE READONLY
"Commands (DDL)","DROP SCHEMA","
"Commands (DDL)","DROP SCHEMA","
DROP SCHEMA [IF EXISTS] schemaName
DROP SCHEMA [IF EXISTS] schemaName
","
","
Drops a schema. Commits current transaction.
Drops a schema.
This command commits an open transaction.
","
","
DROP SCHEMA TEST_SCHEMA
DROP SCHEMA TEST_SCHEMA
"
"
...
@@ -628,7 +657,8 @@ DROP SCHEMA TEST_SCHEMA
...
@@ -628,7 +657,8 @@ DROP SCHEMA TEST_SCHEMA
"Commands (DDL)","DROP SEQUENCE","
"Commands (DDL)","DROP SEQUENCE","
DROP SEQUENCE [IF EXISTS] sequenceName
DROP SEQUENCE [IF EXISTS] sequenceName
","
","
Drops a sequence. This command commits an open transaction.
Drops a sequence.
This command commits an open transaction.
","
","
DROP SEQUENCE SEQ_ID
DROP SEQUENCE SEQ_ID
"
"
...
@@ -645,7 +675,8 @@ DROP TABLE TEST
...
@@ -645,7 +675,8 @@ DROP TABLE TEST
"Commands (DDL)","DROP TRIGGER","
"Commands (DDL)","DROP TRIGGER","
DROP TRIGGER [IF EXISTS] triggerName
DROP TRIGGER [IF EXISTS] triggerName
","
","
Drops an existing trigger. This command commits an open transaction.
Drops an existing trigger.
This command commits an open transaction.
","
","
DROP TRIGGER TRIG_INS
DROP TRIGGER TRIG_INS
"
"
...
@@ -653,10 +684,10 @@ DROP TRIGGER TRIG_INS
...
@@ -653,10 +684,10 @@ DROP TRIGGER TRIG_INS
"Commands (DDL)","DROP USER","
"Commands (DDL)","DROP USER","
DROP USER [IF EXISTS] userName
DROP USER [IF EXISTS] userName
","
","
Drops a user. The current user cannot be dropped. For compatibility, only
Drops a user. The current user cannot be dropped.
unquoted or uppercase user names are allowed. Admin rights are required to
For compatibility, only unquoted or uppercase user names are allowed.
execute this command.
Admin rights are required to execute this command.
This command commits an open transaction.
This command commits an open transaction.
","
","
DROP USER TOM
DROP USER TOM
...
@@ -665,7 +696,8 @@ DROP USER TOM
...
@@ -665,7 +696,8 @@ DROP USER TOM
"Commands (DDL)","DROP VIEW","
"Commands (DDL)","DROP VIEW","
DROP VIEW [IF EXISTS] viewName
DROP VIEW [IF EXISTS] viewName
","
","
Drops a view. This command commits an open transaction.
Drops a view.
This command commits an open transaction.
","
","
DROP VIEW TEST_VIEW
DROP VIEW TEST_VIEW
"
"
...
@@ -676,7 +708,9 @@ TRUNCATE TABLE tableName
...
@@ -676,7 +708,9 @@ TRUNCATE TABLE tableName
Removes all rows from a table. Other than DELETE FROM without where clause, this
Removes all rows from a table. Other than DELETE FROM without where clause, this
command can not be rolled back. This command is faster than DELETE without where
command can not be rolled back. This command is faster than DELETE without where
clause. Only regular data tables without foreign key constraints can be
clause. Only regular data tables without foreign key constraints can be
truncated. This command commits an open transaction.
truncated.
This command commits an open transaction.
","
","
TRUNCATE TABLE TEST
TRUNCATE TABLE TEST
"
"
...
@@ -684,8 +718,9 @@ TRUNCATE TABLE TEST
...
@@ -684,8 +718,9 @@ TRUNCATE TABLE TEST
"Commands (Other)","CHECKPOINT","
"Commands (Other)","CHECKPOINT","
CHECKPOINT
CHECKPOINT
","
","
Flushes the log and data files and switches to a new log file if possible. Admin
Flushes the log and data files and switches to a new log file if possible.
rights are required to execute this command.
Admin rights are required to execute this command.
","
","
CHECKPOINT
CHECKPOINT
"
"
...
@@ -694,7 +729,9 @@ CHECKPOINT
...
@@ -694,7 +729,9 @@ CHECKPOINT
CHECKPOINT SYNC
CHECKPOINT SYNC
","
","
Flushes the log, data and index files and forces all system buffers be written
Flushes the log, data and index files and forces all system buffers be written
to the underlying device. Admin rights are required to execute this command.
to the underlying device.
Admin rights are required to execute this command.
","
","
CHECKPOINT SYNC
CHECKPOINT SYNC
"
"
...
@@ -710,9 +747,10 @@ COMMIT
...
@@ -710,9 +747,10 @@ COMMIT
"Commands (Other)","COMMIT TRANSACTION","
"Commands (Other)","COMMIT TRANSACTION","
COMMIT TRANSACTION transactionName
COMMIT TRANSACTION transactionName
","
","
Sets the resolution of an in-doubt transaction to 'commit'. Admin rights are
Sets the resolution of an in-doubt transaction to 'commit'.
required to execute this command. This command is part of the 2-phase-commit
protocol.
Admin rights are required to execute this command.
This command is part of the 2-phase-commit protocol.
","
","
COMMIT TRANSACTION XID_TEST
COMMIT TRANSACTION XID_TEST
"
"
...
@@ -721,8 +759,10 @@ COMMIT TRANSACTION XID_TEST
...
@@ -721,8 +759,10 @@ COMMIT TRANSACTION XID_TEST
GRANT {SELECT | INSERT | UPDATE | DELETE | ALL} [,...]
GRANT {SELECT | INSERT | UPDATE | DELETE | ALL} [,...]
ON tableName [,...] TO {PUBLIC | userName | roleName}
ON tableName [,...] TO {PUBLIC | userName | roleName}
","
","
Grants rights for a table to a user or role. Admin rights are required to
Grants rights for a table to a user or role.
execute this command.
Admin rights are required to execute this command.
This command commits an open transaction.
","
","
GRANT SELECT ON TEST TO READONLY
GRANT SELECT ON TEST TO READONLY
"
"
...
@@ -730,8 +770,10 @@ GRANT SELECT ON TEST TO READONLY
...
@@ -730,8 +770,10 @@ GRANT SELECT ON TEST TO READONLY
"Commands (Other)","GRANT ROLE","
"Commands (Other)","GRANT ROLE","
GRANT roleName TO {PUBLIC | userName | roleName}
GRANT roleName TO {PUBLIC | userName | roleName}
","
","
Grants a role to a user or role. Admin rights are required to execute this
Grants a role to a user or role.
command.
Admin rights are required to execute this command.
This command commits an open transaction.
","
","
GRANT READONLY TO PUBLIC
GRANT READONLY TO PUBLIC
"
"
...
@@ -747,8 +789,8 @@ HELP SELECT
...
@@ -747,8 +789,8 @@ HELP SELECT
"Commands (Other)","PREPARE COMMIT","
"Commands (Other)","PREPARE COMMIT","
PREPARE COMMIT newTransactionName
PREPARE COMMIT newTransactionName
","
","
Prepares committing a transaction.
This command is part of the 2-phase-commit
Prepares committing a transaction.
protocol.
This command is part of the 2-phase-commit
protocol.
","
","
PREPARE COMMIT XID_TEST
PREPARE COMMIT XID_TEST
"
"
...
@@ -757,8 +799,10 @@ PREPARE COMMIT XID_TEST
...
@@ -757,8 +799,10 @@ PREPARE COMMIT XID_TEST
REVOKE {SELECT | INSERT | UPDATE | DELETE | ALL} [,...]
REVOKE {SELECT | INSERT | UPDATE | DELETE | ALL} [,...]
ON tableName [,...] FROM {PUBLIC | userName | roleName}
ON tableName [,...] FROM {PUBLIC | userName | roleName}
","
","
Removes rights for a table from a user or role. Admin rights are required to
Removes rights for a table from a user or role.
execute this command.
Admin rights are required to execute this command.
This command commits an open transaction.
","
","
REVOKE SELECT ON TEST FROM READONLY
REVOKE SELECT ON TEST FROM READONLY
"
"
...
@@ -767,8 +811,10 @@ REVOKE SELECT ON TEST FROM READONLY
...
@@ -767,8 +811,10 @@ REVOKE SELECT ON TEST FROM READONLY
REVOKE roleName
REVOKE roleName
FROM {PUBLIC | userName | roleName}
FROM {PUBLIC | userName | roleName}
","
","
Removes a role from a user or role. Admin rights are required to execute this
Removes a role from a user or role.
command.
Admin rights are required to execute this command.
This command commits an open transaction.
","
","
REVOKE READONLY FROM TOM
REVOKE READONLY FROM TOM
"
"
...
@@ -785,9 +831,10 @@ ROLLBACK
...
@@ -785,9 +831,10 @@ ROLLBACK
"Commands (Other)","ROLLBACK TRANSACTION","
"Commands (Other)","ROLLBACK TRANSACTION","
ROLLBACK TRANSACTION transactionName
ROLLBACK TRANSACTION transactionName
","
","
Sets the resolution of an in-doubt transaction to 'rollback'. Admin rights are
Sets the resolution of an in-doubt transaction to 'rollback'.
required to execute this command. This command is part of the 2-phase-commit
protocol. DDL statements can not roll back.
Admin rights are required to execute this command.
This command is part of the 2-phase-commit protocol.
","
","
ROLLBACK TRANSACTION XID_TEST
ROLLBACK TRANSACTION XID_TEST
"
"
...
@@ -795,8 +842,8 @@ ROLLBACK TRANSACTION XID_TEST
...
@@ -795,8 +842,8 @@ ROLLBACK TRANSACTION XID_TEST
"Commands (Other)","SAVEPOINT","
"Commands (Other)","SAVEPOINT","
SAVEPOINT savepointName
SAVEPOINT savepointName
","
","
Create a new savepoint. See also ROLLBACK.
Savepoints are only valid until the
Create a new savepoint. See also ROLLBACK.
transaction is committed or rolled back.
Savepoints are only valid until the
transaction is committed or rolled back.
","
","
SAVEPOINT HALF_DONE
SAVEPOINT HALF_DONE
"
"
...
@@ -804,8 +851,8 @@ SAVEPOINT HALF_DONE
...
@@ -804,8 +851,8 @@ SAVEPOINT HALF_DONE
"Commands (Other)","SET @","
"Commands (Other)","SET @","
SET @variableName [=] expression
SET @variableName [=] expression
","
","
Updates a user-defined variable.
This command does not commit a transaction, and
Updates a user-defined variable.
rollback does not affect it.
This command does not commit a transaction, and
rollback does not affect it.
","
","
SET @TOTAL=0
SET @TOTAL=0
"
"
...
@@ -822,9 +869,12 @@ NONE means literals of any kind are not allowed, only parameters and constants
...
@@ -822,9 +869,12 @@ NONE means literals of any kind are not allowed, only parameters and constants
are allowed. NUMBERS mean only numerical and boolean literals are allowed. ALL
are allowed. NUMBERS mean only numerical and boolean literals are allowed. ALL
means all literals are allowed (default).
means all literals are allowed (default).
This setting is persistent. Admin rights are required to execute this command.
See also CREATE CONSTANT.
See also CREATE CONSTANT. This setting can be appended to the database URL:
jdbc:h2:test;ALLOW_LITERALS=NONE
Admin rights are required to execute this command.
This command commits an open transaction.
This setting is persistent.
This setting can be appended to the database URL: jdbc:h2:test;ALLOW_LITERALS=NONE
","
","
SET ALLOW_LITERALS NONE
SET ALLOW_LITERALS NONE
"
"
...
@@ -845,9 +895,11 @@ Sets the size of the cache in KB (each KB being 1024 bytes). The default value
...
@@ -845,9 +895,11 @@ Sets the size of the cache in KB (each KB being 1024 bytes). The default value
is 16384 (16 MB). The value is rounded to the next higher power of two.
is 16384 (16 MB). The value is rounded to the next higher power of two.
Depending on the virtual machine, the actual memory required may be higher.
Depending on the virtual machine, the actual memory required may be higher.
This setting is persistent and affects all connections as there is only one
This setting is persistent and affects all connections as there is only one cache per database.
cache per database. Admin rights are required to execute this command. This
Admin rights are required to execute this command.
setting can be appended to the database URL: jdbc:h2:test;CACHE_SIZE=8192
This command commits an open transaction.
This setting is persistent.
This setting can be appended to the database URL: jdbc:h2:test;CACHE_SIZE=8192
","
","
SET CACHE_SIZE 8192
SET CACHE_SIZE 8192
"
"
...
@@ -860,7 +912,10 @@ executed automatically by the system. The behavior may change in future
...
@@ -860,7 +912,10 @@ executed automatically by the system. The behavior may change in future
releases. Sets the cluster server list. An empty string switches off the cluster
releases. Sets the cluster server list. An empty string switches off the cluster
mode. Switching on the cluster mode requires admin rights, but any user can
mode. Switching on the cluster mode requires admin rights, but any user can
switch it off (this is automatically done when the client detects the other
switch it off (this is automatically done when the client detects the other
server is not responding). Admin rights are required to execute this command.
server is not responding).
Admin rights are required to execute this command.
This command commits an open transaction.
","
","
SET CLUSTER ''
SET CLUSTER ''
"
"
...
@@ -872,8 +927,11 @@ SET [DATABASE] COLLATION
...
@@ -872,8 +927,11 @@ SET [DATABASE] COLLATION
","
","
Sets the collation used for comparing strings. This command can only be executed
Sets the collation used for comparing strings. This command can only be executed
if there are no tables defined. See java.text.Collator for details about
if there are no tables defined. See java.text.Collator for details about
STRENGTH. This setting is persistent. Admin rights are required to execute this
STRENGTH.
command.
Admin rights are required to execute this command.
This command commits an open transaction.
This setting is persistent.
","
","
SET COLLATION ENGLISH
SET COLLATION ENGLISH
"
"
...
@@ -883,7 +941,10 @@ SET COMPRESS_LOB {NO|LZF|DEFLATE}
...
@@ -883,7 +941,10 @@ SET COMPRESS_LOB {NO|LZF|DEFLATE}
","
","
Sets the compression algorithm for BLOB and CLOB data. Compression is usually
Sets the compression algorithm for BLOB and CLOB data. Compression is usually
slower, but needs less disk space. LZF is faster but uses more space.
slower, but needs less disk space. LZF is faster but uses more space.
This setting is persistent. Admin rights are required to execute this command.
Admin rights are required to execute this command.
This command commits an open transaction.
This setting is persistent.
","
","
SET COMPRESS_LOB LZF
SET COMPRESS_LOB LZF
"
"
...
@@ -892,10 +953,11 @@ SET COMPRESS_LOB LZF
...
@@ -892,10 +953,11 @@ SET COMPRESS_LOB LZF
SET DATABASE_EVENT_LISTENER classNameString
SET DATABASE_EVENT_LISTENER classNameString
","
","
Sets the event listener class. An empty string ('') means no listener should be
Sets the event listener class. An empty string ('') means no listener should be
used. This setting is not persistent. Admin rights are required to execute this
used. This setting is not persistent.
command, except if it is set when opening the database (in this case it is reset
just after opening the database). This setting can be appended to the database
Admin rights are required to execute this command, except if it is set when
URL: jdbc:h2:test;DATABASE_EVENT_LISTENER='sample.MyListener'
opening the database (in this case it is reset just after opening the database).
This setting can be appended to the database URL: jdbc:h2:test;DATABASE_EVENT_LISTENER='sample.MyListener'
","
","
SET DATABASE_EVENT_LISTENER 'sample.MyListener'
SET DATABASE_EVENT_LISTENER 'sample.MyListener'
"
"
...
@@ -910,9 +972,12 @@ is closed if the last connection to it is closed). Values 1 and larger mean the
...
@@ -910,9 +972,12 @@ is closed if the last connection to it is closed). Values 1 and larger mean the
number of seconds the database is left open after closing the last connection.
number of seconds the database is left open after closing the last connection.
If the application exits normally or System.exit is called, the database is
If the application exits normally or System.exit is called, the database is
closed immediately, even if a delay is set. This setting is persistent. Admin
closed immediately, even if a delay is set.
rights are required to execute this command. This setting can be appended to the
database URL: jdbc:h2:test;DB_CLOSE_DELAY=-1
Admin rights are required to execute this command.
This command commits an open transaction.
This setting is persistent.
This setting can be appended to the database URL: jdbc:h2:test;DB_CLOSE_DELAY=-1
","
","
SET DB_CLOSE_DELAY -1
SET DB_CLOSE_DELAY -1
"
"
...
@@ -921,8 +986,11 @@ SET DB_CLOSE_DELAY -1
...
@@ -921,8 +986,11 @@ SET DB_CLOSE_DELAY -1
SET DEFAULT LOCK_TIMEOUT int
SET DEFAULT LOCK_TIMEOUT int
","
","
Sets the default lock timeout (in milliseconds) in this database that is used
Sets the default lock timeout (in milliseconds) in this database that is used
for the new sessions. This setting is persistent. The default value for this
for the new sessions. The default value for this setting is 1000 (one second).
setting is 1000 (one second). Admin rights are required to execute this command.
Admin rights are required to execute this command.
This command commits an open transaction.
This setting is persistent.
","
","
SET DEFAULT_LOCK_TIMEOUT 5000
SET DEFAULT_LOCK_TIMEOUT 5000
"
"
...
@@ -933,10 +1001,11 @@ SET DEFAULT_TABLE_TYPE {MEMORY | CACHED}
...
@@ -933,10 +1001,11 @@ SET DEFAULT_TABLE_TYPE {MEMORY | CACHED}
Sets the default table storage type that is used when creating new tables.
Sets the default table storage type that is used when creating new tables.
Memory tables are kept fully in the main memory (including indexes), however
Memory tables are kept fully in the main memory (including indexes), however
changes to the data are stored in the log file. The size of memory tables is
changes to the data are stored in the log file. The size of memory tables is
limited by the memory.
limited by the memory.
The default is CACHED.
The default is CACHED. This setting is persistent. Admin rights are required to
Admin rights are required to execute this command.
execute this command.
This command commits an open transaction.
This setting is persistent.
","
","
SET DEFAULT_TABLE_TYPE MEMORY
SET DEFAULT_TABLE_TYPE MEMORY
"
"
...
@@ -948,8 +1017,10 @@ Switched the database to exclusive mode and back. In exclusive mode, new
...
@@ -948,8 +1017,10 @@ Switched the database to exclusive mode and back. In exclusive mode, new
connections are rejected, and operations by other connections are paused until
connections are rejected, and operations by other connections are paused until
the exclusive mode is disabled. Only the connection that set the exclusive mode
the exclusive mode is disabled. Only the connection that set the exclusive mode
can disable it. When the connection is closed, it is automatically disabled.
can disable it. When the connection is closed, it is automatically disabled.
This setting is not persistent. Admin rights are required to execute this
command.
Admin rights are required to execute this command.
This command commits an open transaction.
This setting is persistent.
","
","
SET EXCLUSIVE TRUE
SET EXCLUSIVE TRUE
"
"
...
@@ -962,7 +1033,9 @@ case-insensitive. Already existing tables are not affected. The effect of
...
@@ -962,7 +1033,9 @@ case-insensitive. Already existing tables are not affected. The effect of
case-insensitive columns is similar to using a collation with strength PRIMARY.
case-insensitive columns is similar to using a collation with strength PRIMARY.
Case-insensitive columns are compared faster than when using a collation.
Case-insensitive columns are compared faster than when using a collation.
This setting is persistent. Admin rights are required to execute this command.
Admin rights are required to execute this command.
This command commits an open transaction.
This setting is persistent.
","
","
SET IGNORECASE TRUE
SET IGNORECASE TRUE
"
"
...
@@ -985,7 +1058,9 @@ application does not close all connections).
...
@@ -985,7 +1058,9 @@ application does not close all connections).
The value 3 means table level locking, but read locks are released immediately
The value 3 means table level locking, but read locks are released immediately
(default; also known as READ_COMMITTED).
(default; also known as READ_COMMITTED).
This setting is persistent. Admin rights are required to execute this command.
Admin rights are required to execute this command.
This command commits an open transaction.
This setting is persistent.
This setting can be appended to the database URL: jdbc:h2:test;LOCK_MODE=3
This setting can be appended to the database URL: jdbc:h2:test;LOCK_MODE=3
","
","
SET LOCK_MODE 1
SET LOCK_MODE 1
...
@@ -995,9 +1070,10 @@ SET LOCK_MODE 1
...
@@ -995,9 +1070,10 @@ SET LOCK_MODE 1
SET LOCK_TIMEOUT int
SET LOCK_TIMEOUT int
","
","
Sets the lock timeout (in milliseconds) for the current session. The default
Sets the lock timeout (in milliseconds) for the current session. The default
value for this setting is 1000 (one second). This command does not commit a
value for this setting is 1000 (one second).
transaction, and rollback does not affect it. This setting can be appended to
the database URL: jdbc:h2:test;LOCK_TIMEOUT=10000
This command does not commit a transaction, and rollback does not affect it.
This setting can be appended to the database URL: jdbc:h2:test;LOCK_TIMEOUT=10000
","
","
SET LOCK_TIMEOUT 1000
SET LOCK_TIMEOUT 1000
"
"
...
@@ -1019,8 +1095,9 @@ and the application terminates abnormally. If logging of index changes is
...
@@ -1019,8 +1095,9 @@ and the application terminates abnormally. If logging of index changes is
enabled, opening a database that was crashed becomes faster because the indexes
enabled, opening a database that was crashed becomes faster because the indexes
don't need to be rebuilt.
don't need to be rebuilt.
Admin rights are required to execute this command. This setting can be appended
Admin rights are required to execute this command.
to the database URL: jdbc:h2:test;LOG=2
This command commits an open transaction.
This setting can be appended to the database URL: jdbc:h2:test;LOG=2
","
","
SET LOG 0
SET LOG 0
"
"
...
@@ -1030,8 +1107,11 @@ SET MAX_LENGTH_INPLACE_LOB int
...
@@ -1030,8 +1107,11 @@ SET MAX_LENGTH_INPLACE_LOB int
","
","
Sets the maximum size of an in-place LOB object. LOB objects larger that this
Sets the maximum size of an in-place LOB object. LOB objects larger that this
size are stored in a separate file, otherwise stored directly in the database
size are stored in a separate file, otherwise stored directly in the database
(in-place). The default max size is 1024. This setting is persistent. Admin
(in-place). The default max size is 1024.
rights are required to execute this command.
Admin rights are required to execute this command.
This command commits an open transaction.
This setting is persistent.
","
","
SET MAX_LENGTH_INPLACE_LOB 128
SET MAX_LENGTH_INPLACE_LOB 128
"
"
...
@@ -1042,8 +1122,11 @@ SET MAX_LOG_SIZE int
...
@@ -1042,8 +1122,11 @@ SET MAX_LOG_SIZE int
Sets the maximum file size of a log file, in megabytes. If the file exceeds the
Sets the maximum file size of a log file, in megabytes. If the file exceeds the
limit, a new file is created. Old files (that are not used for recovery) are
limit, a new file is created. Old files (that are not used for recovery) are
deleted automatically, but multiple log files may exist for some time. The
deleted automatically, but multiple log files may exist for some time. The
default max size is 32 MB. This setting is persistent. Admin rights are required
default max size is 32 MB.
to execute this command.
Admin rights are required to execute this command.
This command commits an open transaction.
This setting is persistent.
","
","
SET MAX_LOG_SIZE 2
SET MAX_LOG_SIZE 2
"
"
...
@@ -1052,8 +1135,11 @@ SET MAX_LOG_SIZE 2
...
@@ -1052,8 +1135,11 @@ SET MAX_LOG_SIZE 2
SET MAX_MEMORY_ROWS int
SET MAX_MEMORY_ROWS int
","
","
The maximum number of rows in a result set that are kept in-memory. If more rows
The maximum number of rows in a result set that are kept in-memory. If more rows
are read, then the rows are buffered to disk. The default value is 10000. This
are read, then the rows are buffered to disk. The default value is 10000.
setting is persistent. Admin rights are required to execute this command.
Admin rights are required to execute this command.
This command commits an open transaction.
This setting is persistent.
","
","
SET MAX_MEMORY_ROWS 1000
SET MAX_MEMORY_ROWS 1000
"
"
...
@@ -1063,8 +1149,12 @@ SET MAX_MEMORY_UNDO int
...
@@ -1063,8 +1149,12 @@ SET MAX_MEMORY_UNDO int
","
","
The maximum number of undo records per a session that are kept in-memory. If a
The maximum number of undo records per a session that are kept in-memory. If a
transaction is larger, the records are buffered to disk. The default value is
transaction is larger, the records are buffered to disk. The default value is
50000. Changes to tables without a primary key can not be buffered to disk. This
50000. Changes to tables without a primary key can not be buffered to disk.
setting is persistent. Admin rights are required to execute this command.
This setting is not supported when using multi-version concurrency.
Admin rights are required to execute this command.
This command commits an open transaction.
This setting is persistent.
","
","
SET MAX_MEMORY_UNDO 1000
SET MAX_MEMORY_UNDO 1000
"
"
...
@@ -1074,9 +1164,11 @@ SET MAX_OPERATION_MEMORY int
...
@@ -1074,9 +1164,11 @@ SET MAX_OPERATION_MEMORY int
","
","
Sets the maximum memory used for large operations (delete and insert), in bytes.
Sets the maximum memory used for large operations (delete and insert), in bytes.
Operations that use more memory are buffered to disk, slowing down the
Operations that use more memory are buffered to disk, slowing down the
operation. The default max size is 100000. 0 means no limit. This setting is not
operation. The default max size is 100000. 0 means no limit.
persistent. Admin rights are required to execute this command. This setting can
be appended to the database URL: jdbc:h2:test;MAX_OPERATION_MEMORY=10000
This setting is not persistent.
Admin rights are required to execute this command.
This setting can be appended to the database URL: jdbc:h2:test;MAX_OPERATION_MEMORY=10000
","
","
SET MAX_OPERATION_MEMORY 0
SET MAX_OPERATION_MEMORY 0
"
"
...
@@ -1086,9 +1178,12 @@ SET MODE {REGULAR | DB2 | DERBY | HSQLDB |
...
@@ -1086,9 +1178,12 @@ SET MODE {REGULAR | DB2 | DERBY | HSQLDB |
MSSQLSERVER | MYSQL | ORACLE | POSTGRESQL}
MSSQLSERVER | MYSQL | ORACLE | POSTGRESQL}
","
","
Changes to another database compatibility mode. For details, see Compatibility
Changes to another database compatibility mode. For details, see Compatibility
Modes in the feature section. This setting is not persistent. Admin rights are
Modes in the feature section.
required to execute this command. This setting can be appended to the database
URL: jdbc:h2:test;MODE=MYSQL
This setting is not persistent.
Admin rights are required to execute this command.
This command commits an open transaction.
This setting can be appended to the database URL: jdbc:h2:test;MODE=MYSQL
","
","
SET MODE HSQLDB
SET MODE HSQLDB
"
"
...
@@ -1098,12 +1193,14 @@ SET MULTI_THREADED {0|1}
...
@@ -1098,12 +1193,14 @@ SET MULTI_THREADED {0|1}
","
","
Enabled (1) or disabled (0) multi-threading inside the database engine. By
Enabled (1) or disabled (0) multi-threading inside the database engine. By
default, this setting is disabled. Currently, enabling this is experimental
default, this setting is disabled. Currently, enabling this is experimental
only. Admin rights are required to execute this command. This is a global
only.
setting, which means it is not possible to open multiple databases with
different modes at the same time in the same virtual machine. This setting is
This is a global setting, which means it is not possible to open multiple databases with different modes at the same time in the same virtual machine.
not persistent, however the value is kept until the virtual machine exits or it
This setting is not persistent, however the value is kept until the virtual machine exits or it is changed.
is changed. This setting can be appended to the database URL:
jdbc:h2:test;MULTI_THREADED=1
Admin rights are required to execute this command.
This command commits an open transaction.
This setting can be appended to the database URL: jdbc:h2:test;MULTI_THREADED=1
","
","
SET MULTI_THREADED 1
SET MULTI_THREADED 1
"
"
...
@@ -1113,9 +1210,11 @@ SET OPTIMIZE_REUSE_RESULTS {0|1}
...
@@ -1113,9 +1210,11 @@ SET OPTIMIZE_REUSE_RESULTS {0|1}
","
","
Enabled (1) or disabled (0) the result reuse optimization. If enabled,
Enabled (1) or disabled (0) the result reuse optimization. If enabled,
subqueries and views used as subqueries are only re-run if the data in one of
subqueries and views used as subqueries are only re-run if the data in one of
the tables was changed. This option is enabled by default. Admin rights are
the tables was changed. This option is enabled by default.
required to execute this command. This setting can be appended to the database
URL: jdbc:h2:test;OPTIMIZE_REUSE_RESULTS=0
Admin rights are required to execute this command.
This command commits an open transaction.
This setting can be appended to the database URL: jdbc:h2:test;OPTIMIZE_REUSE_RESULTS=0
","
","
SET OPTIMIZE_REUSE_RESULTS 0
SET OPTIMIZE_REUSE_RESULTS 0
"
"
...
@@ -1125,6 +1224,8 @@ SET PASSWORD string
...
@@ -1125,6 +1224,8 @@ SET PASSWORD string
","
","
Changes the password of the current user. The password must be in single quotes.
Changes the password of the current user. The password must be in single quotes.
It is case sensitive and can contain spaces.
It is case sensitive and can contain spaces.
This command commits an open transaction.
","
","
SET PASSWORD 'abcstzri!.5'
SET PASSWORD 'abcstzri!.5'
"
"
...
@@ -1134,8 +1235,9 @@ SET QUERY_TIMEOUT int
...
@@ -1134,8 +1235,9 @@ SET QUERY_TIMEOUT int
","
","
Set the query timeout of the current session to the given value. The timeout is
Set the query timeout of the current session to the given value. The timeout is
in milliseconds. All kinds of statements will throw an exception if they take
in milliseconds. All kinds of statements will throw an exception if they take
longer than the given value. The default timeout is 0, meaning no timeout. This
longer than the given value. The default timeout is 0, meaning no timeout.
command does not commit a transaction, and rollback does not affect it.
This command does not commit a transaction, and rollback does not affect it.
","
","
SET QUERY_TIMEOUT 10000
SET QUERY_TIMEOUT 10000
"
"
...
@@ -1145,8 +1247,11 @@ SET REFERENTIAL_INTEGRITY [TRUE|FALSE]
...
@@ -1145,8 +1247,11 @@ SET REFERENTIAL_INTEGRITY [TRUE|FALSE]
","
","
Disabled or enables referential integrity checking for the whole database.
Disabled or enables referential integrity checking for the whole database.
Enabling it does not check existing data. Use ALTER TABLE SET to disable it only
Enabling it does not check existing data. Use ALTER TABLE SET to disable it only
for one table. This setting is not persistent. Admin rights are required to
for one table.
execute this command.
This setting is not persistent.
This command commits an open transaction.
Admin rights are required to execute this command.
","
","
SET REFERENTIAL_INTEGRITY FALSE
SET REFERENTIAL_INTEGRITY FALSE
"
"
...
@@ -1156,6 +1261,8 @@ SET SALT bytes HASH bytes
...
@@ -1156,6 +1261,8 @@ SET SALT bytes HASH bytes
","
","
Sets the password salt and hash for the current user. The password must be in
Sets the password salt and hash for the current user. The password must be in
single quotes. It is case sensitive and can contain spaces.
single quotes. It is case sensitive and can contain spaces.
This command commits an open transaction.
","
","
SET SALT '00' HASH '1122'
SET SALT '00' HASH '1122'
"
"
...
@@ -1165,9 +1272,10 @@ SET SCHEMA schemaName
...
@@ -1165,9 +1272,10 @@ SET SCHEMA schemaName
","
","
Changes the default schema of the current connection. The default schema is used
Changes the default schema of the current connection. The default schema is used
in statements where no schema is set explicitly. The default schema for new
in statements where no schema is set explicitly. The default schema for new
connections is PUBLIC. This command does not commit a transaction, and rollback
connections is PUBLIC.
does not affect it. This setting can be appended to the database URL:
jdbc:h2:test;SCHEMA=ABC
This command does not commit a transaction, and rollback does not affect it.
This setting can be appended to the database URL: jdbc:h2:test;SCHEMA=ABC
","
","
SET SCHEMA INFORMATION_SCHEMA
SET SCHEMA INFORMATION_SCHEMA
"
"
...
@@ -1177,9 +1285,10 @@ SET SCHEMA_SEARCH_PATH schemaName [,...]
...
@@ -1177,9 +1285,10 @@ SET SCHEMA_SEARCH_PATH schemaName [,...]
","
","
Changes the schema search path of the current connection. The default schema is
Changes the schema search path of the current connection. The default schema is
used in statements where no schema is set explicitly. The default schema for new
used in statements where no schema is set explicitly. The default schema for new
connections is PUBLIC. This command does not commit a transaction, and rollback
connections is PUBLIC.
does not affect it. This setting can be appended to the database URL:
jdbc:h2:test;SCHEMA_SEARCH_PATH=ABC,DEF
This command does not commit a transaction, and rollback does not affect it.
This setting can be appended to the database URL: jdbc:h2:test;SCHEMA_SEARCH_PATH=ABC,DEF
","
","
SET SCHEMA_SEARCH_PATH INFORMATION_SCHEMA, PUBLIC
SET SCHEMA_SEARCH_PATH INFORMATION_SCHEMA, PUBLIC
"
"
...
@@ -1189,9 +1298,10 @@ SET THROTTLE int
...
@@ -1189,9 +1298,10 @@ SET THROTTLE int
","
","
Sets the throttle for the current connection. The value is the number of
Sets the throttle for the current connection. The value is the number of
milliseconds delay after each 50 ms. The default value is 0 (throttling
milliseconds delay after each 50 ms. The default value is 0 (throttling
disabled). This command does not commit a transaction, and rollback does not
disabled).
affect it. This setting can be appended to the database URL:
jdbc:h2:test;THROTTLE=50
This command does not commit a transaction, and rollback does not affect it.
This setting can be appended to the database URL: jdbc:h2:test;THROTTLE=50
","
","
SET THROTTLE 200
SET THROTTLE 200
"
"
...
@@ -1201,12 +1311,12 @@ SET {TRACE_LEVEL_FILE | TRACE_LEVEL_SYSTEM_OUT} int
...
@@ -1201,12 +1311,12 @@ SET {TRACE_LEVEL_FILE | TRACE_LEVEL_SYSTEM_OUT} int
","
","
Sets the trace level for file the file or system out stream. Levels are: 0=off,
Sets the trace level for file the file or system out stream. Levels are: 0=off,
1=error, 2=info, 3=debug. The default level is 1 for file and 0 for system out.
1=error, 2=info, 3=debug. The default level is 1 for file and 0 for system out.
To use SLF4J, append ;TRACE_LEVEL_FILE=4 to the database URL when opening the database.
This setting is not persistent. Admin rights are required to execute this
This setting is not persistent.
command. This command does not commit a transaction, and rollback does not
Admin rights are required to execute this command.
affect it. This setting can be appended to the database URL:
This command does not commit a transaction, and rollback does not affect it.
jdbc:h2:test;TRACE_LEVEL_SYSTEM_OUT=3 To use SLF4J, append ;TRACE_LEVEL_FILE=4
This setting can be appended to the database URL: jdbc:h2:test;TRACE_LEVEL_SYSTEM_OUT=3
to the database URL when opening the database.
","
","
SET TRACE_LEVEL_SYSTEM_OUT 3
SET TRACE_LEVEL_SYSTEM_OUT 3
"
"
...
@@ -1218,9 +1328,10 @@ Sets the maximum trace file size. If the file exceeds the limit, the file is
...
@@ -1218,9 +1328,10 @@ Sets the maximum trace file size. If the file exceeds the limit, the file is
renamed to .old and a new file is created. If another .old file exists, it is
renamed to .old and a new file is created. If another .old file exists, it is
deleted. The default max size is 16 MB.
deleted. The default max size is 16 MB.
This setting is persistent. Admin rights are required to execute this command.
This setting is persistent.
This setting can be appended to the database URL:
Admin rights are required to execute this command.
jdbc:h2:test;TRACE_MAX_FILE_SIZE=3
This command commits an open transaction.
This setting can be appended to the database URL: jdbc:h2:test;TRACE_MAX_FILE_SIZE=3
","
","
SET TRACE_MAX_FILE_SIZE 10
SET TRACE_MAX_FILE_SIZE 10
"
"
...
@@ -1231,6 +1342,8 @@ SET UNDO_LOG int
...
@@ -1231,6 +1342,8 @@ SET UNDO_LOG int
Enables (1) or disables (0) the per session undo log. The undo log is enabled by
Enables (1) or disables (0) the per session undo log. The undo log is enabled by
default. When disabled, transactions can not be rolled back. This setting should
default. When disabled, transactions can not be rolled back. This setting should
only be used for bulk operations that don't need to be atomic.
only be used for bulk operations that don't need to be atomic.
This command commits an open transaction.
","
","
SET UNDO_LOG 0
SET UNDO_LOG 0
"
"
...
@@ -1239,9 +1352,11 @@ SET UNDO_LOG 0
...
@@ -1239,9 +1352,11 @@ SET UNDO_LOG 0
SET WRITE_DELAY int
SET WRITE_DELAY int
","
","
Set the maximum delay between a commit and flushing the log, in milliseconds.
Set the maximum delay between a commit and flushing the log, in milliseconds.
This setting is persistent. The default is 500 ms. Admin rights are required to
This setting is persistent. The default is 500 ms.
execute this command. This setting can be appended to the database URL:
jdbc:h2:test;WRITE_DELAY=0
Admin rights are required to execute this command.
This command commits an open transaction.
This setting can be appended to the database URL: jdbc:h2:test;WRITE_DELAY=0
","
","
SET WRITE_DELAY 2000
SET WRITE_DELAY 2000
"
"
...
@@ -1251,14 +1366,15 @@ SHUTDOWN [IMMEDIATELY|COMPACT|SCRIPT]
...
@@ -1251,14 +1366,15 @@ SHUTDOWN [IMMEDIATELY|COMPACT|SCRIPT]
","
","
This statement is closes all open connections to the database and closes the
This statement is closes all open connections to the database and closes the
database. This command usually does not need to be used, as the database is
database. This command usually does not need to be used, as the database is
closed automatically when the last connection to it is closed. Admin rights are
closed automatically when the last connection to it is closed.
required to execute this command.
If no option is used, then all connections are closed. If the IMMEDIATELY option
If no option is used, then all connections are closed. If the IMMEDIATELY option
is used, the database files are closed as if the hard drive stops working,
is used, the database files are closed as if the hard drive stops working,
without rollback of the open transactions; otherwise any open transaction are
without rollback of the open transactions; otherwise any open transaction are
rolled back before closing the connection. COMPACT and SCRIPT are only supported
rolled back before closing the connection. COMPACT and SCRIPT are only supported
for compatibility and have no effect.
for compatibility and have no effect.
Admin rights are required to execute this command.
","
","
SHUTDOWN
SHUTDOWN
"
"
...
@@ -1383,15 +1499,15 @@ compare { {{ALL|ANY|SOME}(select)} | operand }
...
@@ -1383,15 +1499,15 @@ compare { {{ALL|ANY|SOME}(select)} | operand }
| [NOT] LIKE operand [ESCAPE string]
| [NOT] LIKE operand [ESCAPE string]
| [NOT] REGEXP operand
| [NOT] REGEXP operand
","
","
The right hand side of a condition.
The right hand side of a condition.
When comparing with LIKE, the wildcards characters are _ (any one character)
When comparing with LIKE, the wildcards characters are _ (any one character)
and % (any characters). The database uses an index when comparing with LIKE
and % (any characters). The database uses an index when comparing with LIKE
except if the operand starts with a wildcard. To search for the characters % and
except if the operand starts with a wildcard. To search for the characters % and
_, the characters need to be escaped. The default escape character is \ (backslash).
_, the characters need to be escaped. The default escape character is \ (backslash).
To select no escape character, use ESCAPE '' (empty string).
To select no escape character, use ESCAPE '' (empty string).
When comparing with REGEXP, regular expression matching is used.
When comparing with REGEXP, regular expression matching is used.
See Java Matcher.find for details.
See Java Matcher.find for details.
","
","
LIKE 'Jo%'
LIKE 'Jo%'
...
@@ -1826,7 +1942,7 @@ OTHER
...
@@ -1826,7 +1942,7 @@ OTHER
VARCHAR2 | NVARCHAR | NVARCHAR2 | VARCHAR_CASESENSITIVE}
VARCHAR2 | NVARCHAR | NVARCHAR2 | VARCHAR_CASESENSITIVE}
[( precisionInt )]
[( precisionInt )]
","
","
Unicode String. Use two single quotes ('') to create a quote. The maximum precison
Unicode String. Use two single quotes ('') to create a quote. The maximum precis
i
on
is Integer.MAX_VALUE. The precision is a size constraint; only the actual data is
is Integer.MAX_VALUE. The precision is a size constraint; only the actual data is
persisted. The whole text is kept in memory when using this data type. For large text data CLOB
persisted. The whole text is kept in memory when using this data type. For large text data CLOB
should be used; see there for details.
should be used; see there for details.
...
@@ -1856,7 +1972,7 @@ VARCHAR_IGNORECASE
...
@@ -1856,7 +1972,7 @@ VARCHAR_IGNORECASE
This type is supported for compatibility with other databases and older
This type is supported for compatibility with other databases and older
applications. The difference to VARCHAR is that trailing spaces are ignored and
applications. The difference to VARCHAR is that trailing spaces are ignored and
not persisted. Unicode String. Use two single quotes ('') to create a quote.
not persisted. Unicode String. Use two single quotes ('') to create a quote.
The maximum precison is Integer.MAX_VALUE. The precision is a size constraint;
The maximum precis
i
on is Integer.MAX_VALUE. The precision is a size constraint;
only the actual data is persisted. The whole text is kept in memory when using
only the actual data is persisted. The whole text is kept in memory when using
this data type. For large text data CLOB should be used; see there for details.
this data type. For large text data CLOB should be used; see there for details.
...
@@ -2876,8 +2992,9 @@ CANCEL_SESSION(sessionInt): boolean
...
@@ -2876,8 +2992,9 @@ CANCEL_SESSION(sessionInt): boolean
Cancels the currently executing statement of another session. The method only
Cancels the currently executing statement of another session. The method only
works if the multithreaded kernel is enabled (see SET MULTI_THREADED). Returns
works if the multithreaded kernel is enabled (see SET MULTI_THREADED). Returns
true if the statement was canceled, false if the session is closed or no
true if the statement was canceled, false if the session is closed or no
statement is currently executing. Admin rights are required to execute this
statement is currently executing.
command.
Admin rights are required to execute this command.
","
","
CANCEL_SESSION(3)
CANCEL_SESSION(3)
"
"
...
@@ -2973,8 +3090,8 @@ The parameter nullString is used when writing NULL (by default nothing is writte
...
@@ -2973,8 +3090,8 @@ The parameter nullString is used when writing NULL (by default nothing is writte
when NULL appears). The default line separator is the default value for this
when NULL appears). The default line separator is the default value for this
system ('line.separator' system property).
system ('line.separator' system property).
The returned value is the number or
The returned value is the number or
rows written.
rows written.
Admin rights are required to execute this command.
Admin rights are required to execute this command.
","
","
CALL CSVWRITE('test.csv', 'SELECT * FROM TEST');
CALL CSVWRITE('test.csv', 'SELECT * FROM TEST');
-- Write a file with UTF-8 encoding and the pipe (|) as field separator
-- Write a file with UTF-8 encoding and the pipe (|) as field separator
...
@@ -3004,8 +3121,8 @@ FILE_READ(fileNameString [,encodingString]): value
...
@@ -3004,8 +3121,8 @@ FILE_READ(fileNameString [,encodingString]): value
Returns the contents of a file. If only one parameter is supplied, the data are
Returns the contents of a file. If only one parameter is supplied, the data are
returned as a BLOB. If two parameters are used, the data is returned as a CLOB
returned as a BLOB. If two parameters are used, the data is returned as a CLOB
(text). The second parameter is the character set to use, NULL meaning the
(text). The second parameter is the character set to use, NULL meaning the
default character set for this system. File names and URLs are supported.
Admin
default character set for this system. File names and URLs are supported.
rights are required to execute this command.
Admin
rights are required to execute this command.
","
","
SELECT LENGTH(FILE_READ('~/.h2.server.properties')) LEN;
SELECT LENGTH(FILE_READ('~/.h2.server.properties')) LEN;
SELECT FILE_READ('http://localhost:8182/stylesheet.css', NULL) CSS;
SELECT FILE_READ('http://localhost:8182/stylesheet.css', NULL) CSS;
...
@@ -3066,8 +3183,8 @@ userString, passwordString, sourceSchemaString): resultSet
...
@@ -3066,8 +3183,8 @@ userString, passwordString, sourceSchemaString): resultSet
Creates table links for all tables in a schema. If tables with the same name
Creates table links for all tables in a schema. If tables with the same name
already exist, they are dropped first. The target schema is created
already exist, they are dropped first. The target schema is created
automatically if it does not yet exist. The driver name may be empty if the
automatically if it does not yet exist. The driver name may be empty if the
driver is already loaded. The list of tables linked is returned.
Admin rights
driver is already loaded. The list of tables linked is returned.
are required to execute this command.
Admin rights
are required to execute this command.
","
","
CALL LINK_SCHEMA('TEST2', '', 'jdbc:h2:test2', 'sa', 'sa', 'PUBLIC');
CALL LINK_SCHEMA('TEST2', '', 'jdbc:h2:test2', 'sa', 'sa', 'PUBLIC');
"
"
...
@@ -3075,8 +3192,9 @@ CALL LINK_SCHEMA('TEST2', '', 'jdbc:h2:test2', 'sa', 'sa', 'PUBLIC');
...
@@ -3075,8 +3192,9 @@ CALL LINK_SCHEMA('TEST2', '', 'jdbc:h2:test2', 'sa', 'sa', 'PUBLIC');
"Functions (System)","MEMORY_FREE","
"Functions (System)","MEMORY_FREE","
MEMORY_FREE(): int
MEMORY_FREE(): int
","
","
Returns the free memory in KB (where 1024 bytes is a KB). The garbage is run
Returns the free memory in KB (where 1024 bytes is a KB).
before returning the value. Admin rights are required to execute this command.
The garbage is run before returning the value.
Admin rights are required to execute this command.
","
","
MEMORY_FREE()
MEMORY_FREE()
"
"
...
@@ -3084,8 +3202,9 @@ MEMORY_FREE()
...
@@ -3084,8 +3202,9 @@ MEMORY_FREE()
"Functions (System)","MEMORY_USED","
"Functions (System)","MEMORY_USED","
MEMORY_USED(): int
MEMORY_USED(): int
","
","
Returns the used memory in KB (where 1024 bytes is a KB). The garbage is run
Returns the used memory in KB (where 1024 bytes is a KB).
before returning the value. Admin rights are required to execute this command.
The garbage is run before returning the value.
Admin rights are required to execute this command.
","
","
MEMORY_USED()
MEMORY_USED()
"
"
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论