EN
MySQL example tables
0 points

xxxxxxxxxx
1
CREATE TABLE `users` (
2
`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
3
`username` VARCHAR(50) NOT NULL,
4
`registration_time` DATETIME NOT NULL,
5
PRIMARY KEY (`id`)
6
);
xxxxxxxxxx
1
INSERT INTO `users`
2
(`username`, `registration_time`)
3
VALUES
4
('Tom', '2021-01-01 11:41:31'),
5
('Chris','2021-01-02 11:42:45'),
6
('Jack','2021-01-03 15:13:39'),
7
('Kim','2021-01-03 15:24:51'),
8
('Marco','2021-01-04 22:35:38'),
9
('Kate','2021-01-04 22:46:51'),
10
('Nam','2021-01-04 22:57:37');

xxxxxxxxxx
1
CREATE TABLE `users` (
2
`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
3
`username` VARCHAR(50) NOT NULL,
4
`registration_date` DATE NOT NULL,
5
`registration_time` TIME NOT NULL,
6
PRIMARY KEY (`id`)
7
);
xxxxxxxxxx
1
INSERT INTO `users`
2
(`username`, `registration_date`, `registration_time` )
3
VALUES
4
('Tom', '2021-01-01', '11:41:31'),
5
('Chris','2021-01-02', '11:42:45'),
6
('Jack','2021-01-03', ' 15:13:39'),
7
('Kim','2021-01-03', '15:24:51'),
8
('Marco','2021-01-04', '22:35:38'),
9
('Kate','2021-01-04', '22:46:51'),
10
('Nam','2021-01-04', '22:57:37');

xxxxxxxxxx
1
CREATE TABLE `values` (
2
`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
3
`min_value` INT,
4
`max_value` INT,
5
PRIMARY KEY (`id`)
6
);
xxxxxxxxxx
1
INSERT INTO `values`
2
(`min_value`, `max_value`)
3
values
4
(1000, 1500),
5
(1500, 2000),
6
(1400, 2500),
7
(1200, 3000),
8
(1800, 3500);