Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
ce00245a
提交
ce00245a
authored
6 年前
作者:
Evgenij Ryazanov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Move out some other tests from testScript.sql
上级
bfc577d3
显示空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
35 行增加
和
30 行删除
+35
-30
timestamp.sql
h2/src/test/org/h2/test/scripts/datatypes/timestamp.sql
+24
-0
week.sql
...c/test/org/h2/test/scripts/functions/timeanddate/week.sql
+11
-0
testScript.sql
h2/src/test/org/h2/test/scripts/testScript.sql
+0
-30
没有找到文件。
h2/src/test/org/h2/test/scripts/datatypes/timestamp.sql
浏览文件 @
ce00245a
...
@@ -105,3 +105,27 @@ SELECT T0 FROM TEST;
...
@@ -105,3 +105,27 @@ SELECT T0 FROM TEST;
DROP
TABLE
TEST
;
DROP
TABLE
TEST
;
>
ok
>
ok
create
table
test
(
id
int
,
d
timestamp
);
>
ok
insert
into
test
values
(
1
,
'2006-01-01 12:00:00.000'
);
>
update
count
:
1
insert
into
test
values
(
1
,
'1999-12-01 23:59:00.000'
);
>
update
count
:
1
select
*
from
test
where
d
=
'1999-12-01 23:59:00.000'
;
>
ID
D
>
-- -------------------
>
1
1999
-
12
-
01
23
:
59
:
00
>
rows
:
1
select
*
from
test
where
d
=
timestamp
'2006-01-01 12:00:00.000'
;
>
ID
D
>
-- -------------------
>
1
2006
-
01
-
01
12
:
00
:
00
>
rows
:
1
drop
table
test
;
>
ok
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/scripts/functions/timeanddate/week.sql
浏览文件 @
ce00245a
...
@@ -11,3 +11,14 @@ insert into test values(1, 'Hello');
...
@@ -11,3 +11,14 @@ insert into test values(1, 'Hello');
select
week
(
date
'2003-01-09'
)
from
test
;
select
week
(
date
'2003-01-09'
)
from
test
;
>>
2
>>
2
drop
table
test
;
>
ok
-- ISO_WEEK
select
iso_week
(
'2006-12-31'
)
w
,
iso_year
(
'2007-12-31'
)
y
,
iso_day_of_week
(
'2007-12-31'
)
w
;
>
W
Y
W
>
-- ---- -
>
52
2008
1
>
rows
:
1
This diff is collapsed.
Click to expand it.
h2/src/test/org/h2/test/scripts/testScript.sql
浏览文件 @
ce00245a
...
@@ -833,12 +833,6 @@ delete from test where id = 1;
...
@@ -833,12 +833,6 @@ delete from test where id = 1;
drop
table
test
;
drop
table
test
;
>
ok
>
ok
select
iso_week
(
'2006-12-31'
)
w
,
iso_year
(
'2007-12-31'
)
y
,
iso_day_of_week
(
'2007-12-31'
)
w
;
>
W
Y
W
>
-- ---- -
>
52
2008
1
>
rows
:
1
create
schema
a
;
create
schema
a
;
>
ok
>
ok
...
@@ -2221,30 +2215,6 @@ select * from Foo where A like 'abc%' escape '\' AND B=1;
...
@@ -2221,30 +2215,6 @@ select * from Foo where A like 'abc%' escape '\' AND B=1;
drop table Foo;
drop table Foo;
> ok
> ok
create table test(id int, d timestamp);
> ok
insert into test values(1, '
2006
-
01
-
01
12
:
00
:
00
.
000
');
> update count: 1
insert into test values(1, '
1999
-
12
-
01
23
:
59
:
00
.
000
');
> update count: 1
select * from test where d= '
1999
-
12
-
01
23
:
59
:
00
.
000
';
> ID D
> -- -------------------
> 1 1999-12-01 23:59:00
> rows: 1
select * from test where d= timestamp '
2006
-
01
-
01
12
:
00
:
00
.
000
';
> ID D
> -- -------------------
> 1 2006-01-01 12:00:00
> rows: 1
drop table test;
> ok
create table test(id int, b binary);
create table test(id int, b binary);
> ok
> ok
...
...
This diff is collapsed.
Click to expand it.
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论