summaryrefslogtreecommitdiff
path: root/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_fractional_seconds_without_index.result
blob: 0b1bf0f0eb4a8cc18dab165cb03216fe96e5cfe2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
DROP TABLE IF EXISTS diaries;
CREATE TABLE diaries (
id INT PRIMARY KEY AUTO_INCREMENT,
title TEXT,
created_at DATETIME(6)
) DEFAULT CHARSET UTF8;
SHOW CREATE TABLE diaries;
Table	Create Table
diaries	CREATE TABLE `diaries` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` text,
  `created_at` datetime(6) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=Mroonga DEFAULT CHARSET=utf8
INSERT INTO diaries (title, created_at)
VALUES ("clear day", "2012-01-29 21:51:01.111111");
INSERT INTO diaries (title, created_at)
VALUES ("rainy day", "2012-01-30 01:23:45.333");
INSERT INTO diaries (title, created_at)
VALUES ("cloudy day", "2012-01-31 08:32:10.5555");
SELECT * FROM diaries;
id	title	created_at
1	clear day	2012-01-29 21:51:01.111111
2	rainy day	2012-01-30 01:23:45.333000
3	cloudy day	2012-01-31 08:32:10.555500
SELECT * FROM diaries
WHERE created_at BETWEEN "2012-01-29 00:00:00.123456" AND
"2012-01-31 00:00:00.999999";
id	title	created_at
1	clear day	2012-01-29 21:51:01.111111
2	rainy day	2012-01-30 01:23:45.333000
DROP TABLE diaries;