DROP TABLE IF EXISTS diaries;
CREATE TABLE diaries (
day DATETIME(6) PRIMARY KEY,
title TEXT
) DEFAULT CHARSET UTF8;
SHOW CREATE TABLE diaries;
Table	Create Table
diaries	CREATE TABLE `diaries` (
  `day` datetime(6) NOT NULL,
  `title` text,
  PRIMARY KEY (`day`)
) ENGINE=mroonga DEFAULT CHARSET=utf8
INSERT INTO diaries (day, title)
VALUES ("2012-01-29 21:51:01.111111", "clear day");
INSERT INTO diaries (day, title)
VALUES ("2012-01-30 01:23:45.333", "rainy day");
INSERT INTO diaries (day, title)
VALUES ("2012-01-31 08:32:10.5555", "cloudy day");
SELECT * FROM diaries;
day	title
2012-01-29 21:51:01.111111	clear day
2012-01-30 01:23:45.333000	rainy day
2012-01-31 08:32:10.555500	cloudy day
SELECT * FROM diaries
WHERE day BETWEEN "2012-01-29 00:00:00.123456" AND
"2012-01-31 00:00:00.999999";
day	title
2012-01-29 21:51:01.111111	clear day
2012-01-30 01:23:45.333000	rainy day
DROP TABLE diaries;
