提交 05c6a343 authored 作者: Thomas Mueller's avatar Thomas Mueller

Document UNION evaluation order.

上级 a8424521
......@@ -21,6 +21,10 @@ LIMIT limits the number of rows returned by the query, OFFSET specified
how many rows to skip. SAMPLE_SIZE limits the number of rows read for
aggregate queries.
Multiple set operators (UNION/INTERSECT/MINUS/EXPECT) are evaluated
from left to right. For compatibility with other databases and future versions
of H2 please use parentheses.
If FOR UPDATE is specified, the tables are locked for writing.
","
SELECT * FROM TEST;
......@@ -3209,9 +3213,9 @@ SELECT ""Last Name"" FROM CSVREAD('address.csv');
"Functions (System)","CSVWRITE","
CSVWRITE ( fileNameString, queryString [, csvOptions [, lineSepString] ] )
","
Writes a CSV (comma separated values). The file is overwritten if it exists.
Writes a CSV (comma separated values). The file is overwritten if it exists.
If only a file name is specified, it will be written to the current working directory.
For each parameter, NULL means the default value should be used.
For each parameter, NULL means the default value should be used.
The default charset is the default value for this system, and the default field separator is a comma.
The values are converted to text using the default string representation;
......
......@@ -19,7 +19,7 @@ Change Log
<h2>Next Version (unreleased)</h2>
<ul><li>Nested UNION/INTERSECT queries with brackets could produce the wrong result if used within a subquery. Example:
select count(*) from (select 1 union (select 2 intersect select 2)) x;
select count(*) from (select 1 union (select 2 intersect select 2)) x;
</li><li>Comparing an column against a constant expression with a higher precision or length
than the column could give wrong results (the expression was truncated before comparing).
</li><li>Improved PostgreSQL compatibility (support SHOW DEFAULT_TRANSACTION_ISOLATION).
......
......@@ -473,6 +473,7 @@ See also <a href="build.html#providing_patches">Providing Patches</a>.
</li><li>Automatic mixed mode: support a port range list (to avoid firewall problems).
</li><li>Support the pseudo column rowid, oid, _rowid_.
</li><li>Support TRUNCATE for linked tables.
</li><li>UNION: evaluate INTERSECT before UNION (like most other database except Oracle).
</li></ul>
<h2>Not Planned</h2>
......
......@@ -31,7 +31,7 @@ insert into test values('010203040506070809');
select first_bytes(data, 3) from test;
-- encrypt and decrypt strings
CALL CAST(ENCRYPT('AES', HASH('SHA256', STRINGTOUTF8('key'), 1), STRINGTOUTF8('Hello')) AS VARCHAR);
CALL CAST(ENCRYPT('AES', HASH('SHA256', STRINGTOUTF8('key'), 1), STRINGTOUTF8('Hello')) AS VARCHAR);
CALL TRIM(CHAR(0) FROM UTF8TOSTRING(DECRYPT('AES', HASH('SHA256', STRINGTOUTF8('key'), 1), '16e44604230717eec9f5fa6058e77e83')));
DROP ALIAS ENC;
DROP ALIAS DEC;
......
......@@ -629,4 +629,4 @@ sweden abbreviated xmx trede googlecode gustav standing hashes
decompressed expansion ziv abbreviated augments omitted gain
subtracted maxed logical lempel increases sibling impersonate proper remembers
moon centric adeptia workflows generalized bpchar binaries incremental poor
slowly prefs
slowly prefs precedence
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论