提交 a92ab735 authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Extract some tests to indexes.sql

上级 6641518a
......@@ -87,6 +87,7 @@ public class TestScript extends TestBase {
testScript("testScript.sql");
testScript("derived-column-names.sql");
testScript("indexes.sql");
testScript("information_schema.sql");
testScript("joins.sql");
testScript("range_table.sql");
......
-- Copyright 2004-2018 H2 Group. Multiple-Licensed under the MPL 2.0,
-- and the EPL 1.0 (http://h2database.com/html/license.html).
-- Initial Developer: H2 Group
--
create table test(a int, b int);
> ok
insert into test values(1, 1);
> update count: 1
create index on test(a, b desc);
> ok
select * from test where a = 1;
> A B
> - -
> 1 1
> rows: 1
drop table test;
> ok
create table test(x int);
> ok
create hash index on test(x);
> ok
select 1 from test group by x;
> 1
> -
> rows: 0
drop table test;
> ok
......@@ -90,24 +90,6 @@ AND studentID = 2;
drop table results;
> ok
create table test(a int, b int);
> ok
insert into test values(1, 1);
> update count: 1
create index on test(a, b desc);
> ok
select * from test where a = 1;
> A B
> - -
> 1 1
> rows: 1
drop table test;
> ok
create table test(id int, name varchar) as select 1, 'a';
> ok
......@@ -132,20 +114,6 @@ select case seq.nextval when 2 then 'two' when 3 then 'three' when 1 then 'one'
drop sequence seq;
> ok
create table test(x int);
> ok
create hash index on test(x);
> ok
select 1 from test group by x;
> 1
> -
> rows: 0
drop table test;
> ok
select * from dual where x = x + 1 or x in(2, 0);
> X
> -
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论