提交 1534f364 authored 作者: Thomas Mueller's avatar Thomas Mueller

The syntax for CREATE TABLE ... AS SELECT ... has been changed: options such as…

The syntax for CREATE TABLE ... AS SELECT ... has been changed: options such as NOT PERSISTENT are now before the query (AS SELECT), because otherwise they might be interpreted as a part of the query.
上级 b8bf1bac
......@@ -275,7 +275,7 @@ ALTER TABLE TEST ALTER COLUMN NAME SET NULL;
"
"Commands (DDL)","ALTER TABLE DROP COLUMN","
ALTER TABLE tableName DROP COLUMN columnName
ALTER TABLE tableName DROP COLUMN [ IF EXISTS ] columnName
","
Removes a column from a table.
This command commits an open transaction.
......@@ -561,10 +561,9 @@ CREATE SEQUENCE SEQ_ID
"Commands (DDL)","CREATE TABLE","
CREATE [ CACHED | MEMORY ] [ TEMP | [ GLOBAL | LOCAL ] TEMPORARY ]
TABLE [ IF NOT EXISTS ] name
{ { ( { columnDefinition | constraint } [,...] ) [ AS select ] }
| { AS select } }
[ ( { columnDefinition | constraint } [,...] ) ]
[ ENGINE tableEngineName ] [ NOT PERSISTENT ] [ TRANSACTIONAL ]
","
[ AS select ]","
Creates a new table.
Cached tables (the default for regular tables) are persistent,
......@@ -586,6 +585,9 @@ The table engine class must implement the interface ""org.h2.api.TableEngine"".
Tables with the NOT PERSISTENT modifier are kept fully in memory, and all
rows are lost when the database is closed.
The column definition is optional if a query is specified.
In that case the column list of the query is used.
This command commits an open transaction, except when using
TRANSACTIONAL (only supported for temporary tables).
","
......
......@@ -18,7 +18,15 @@ Change Log
<h1>Change Log</h1>
<h2>Next Version (unreleased)</h2>
<ul><li>PgServer: non-admin users could not open a database.
<ul><li>The syntax for CREATE TABLE ... AS SELECT ... has been changed:
options such as NOT PERSISTENT are now before the query (AS SELECT), because otherwise
they might be interpreted as a part of the query.
</li><li>With version 1.3.156, the DB2 mode could not be used with CLOB and BLOB data.
</li><li>When upgrading from an older 1.3.x version to version 1.3.156,
CLOB and BLOB data was lost in many cases.
</li><li>The optimization for COUNT(..) on columns that are not nullable
was also used for COUNT(DISTINCT ..), which is incorrect.
</li><li>PgServer: non-admin users could not open a database.
</li><li>Non-admin users could not open a database using a mode (MODE=xxx)
if the database was already open, even if the mode matched.
</li><li>The SQL state of the following exceptions has been changed:
......
......@@ -117,6 +117,7 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
</li><li>Max memory rows / max undo log size: use block count / row size not row count.
</li><li>Support 123L syntax as in Java; example: SELECT (2000000000*2).
</li><li>Implement point-in-time recovery.
</li><li>Support PL/SQL (programming language / control flow statements).
</li><li>LIKE: improved version for larger texts (currently using naive search).
</li><li>Throw an exception when the application calls getInt on a Long (optional).
</li><li>Default date format for input and output (local date constants).
......@@ -321,7 +322,6 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
</li><li>Serialized file lock: support long running queries.
</li><li>Network: use 127.0.0.1 if other addresses don't work.
</li><li>Pluggable network protocol (currently Socket/ServerSocket over TCP/IP) - see also TransportServer with master slave replication.
</li><li>Select for update in mvcc mode: only lock the selected records.
</li><li>Support reading JCR data: one table per node type; query table; cache option
</li><li>OSGi: create a sample application, test, document.
</li><li>help.csv: use complete examples for functions; run as test case.
......@@ -543,10 +543,13 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
</li><li>PostgreSQL compatibility: support PgAdmin III (specially the function current_setting).
</li><li>MySQL compatibility: support TIMESTAMPADD.
</li><li>Support SELECT ... FOR UPDATE with joins (supported by PostgreSQL, MySQL, and HSQLDB; but not Derby).
</li><li>Support SELECT ... FOR UPDATE OF [field-list] (supported by PostgreSQL, MySQL, and HSQLDB; but not Derby).
</li><li>Support SELECT ... FOR UPDATE OF [table-list] (supported by PostgreSQL, HSQLDB, Sybase).
</li><li>TRANSACTION_ID() for in-memory databases.
</li><li>TRANSACTION_ID() should be long (same as HSQLDB and PostgreSQL).
</li><li>Oracle compatibility: convert empty strings to null.
</li><li>Support [INNER | OUTER] JOIN USING(column [,...]).
</li><li>Support NATURAL [ { LEFT | RIGHT } [ OUTER ] | INNER ] JOIN (Derby, Oracle)
</li></ul>
<h2>Not Planned</h2>
......
......@@ -116,9 +116,9 @@ public class TestLob extends TestBase {
}
if (upgraded) {
if (config.memory) {
stat.execute("update information_schema.lob_map set offset=null");
stat.execute("update information_schema.lob_map set pos=null");
} else {
stat.execute("alter table information_schema.lob_map drop column offset");
stat.execute("alter table information_schema.lob_map drop column pos");
conn.close();
conn = getConnection("lob");
}
......
......@@ -149,7 +149,7 @@ select * from test order by id;
> 1;
drop table test;
create memory table test(id int) as select 1 from dual not persistent;
create memory table test(id int) not persistent as select 1 from dual;
insert into test values(1);
select count(1) from test;
> 2;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论