Languages
[Edit]
EN

MySQL example tables

0 points
Created by:
Keisha-Acosta
260

Table 1 - datetime

MySQL - example data used to ...
MySQL - example data used to ...
CREATE TABLE `users` (
	`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
	`username` VARCHAR(50) NOT NULL,
	`registration_time` DATETIME NOT NULL,
	PRIMARY KEY (`id`)
);
INSERT INTO `users`
	(`username`, `registration_time`)
VALUES
	('Tom', '2021-01-01 11:41:31'),
	('Chris','2021-01-02 11:42:45'),
	('Jack','2021-01-03 15:13:39'),
    ('Kim','2021-01-03 15:24:51'),
    ('Marco','2021-01-04 22:35:38'),
	('Kate','2021-01-04 22:46:51'),
	('Nam','2021-01-04 22:57:37');

Table 2 - date & time

MySQL - example data used to ...
MySQL - example data used to ...

 

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

Table 3 - int

MySQL - example data used to ...
MySQL - example data used to ...
CREATE TABLE `values` (
	`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
	`min_value` INT,
	`max_value` INT,
	PRIMARY KEY (`id`)
);
INSERT INTO `values`
    (`min_value`, `max_value`)
values
    (1000, 1500),
    (1500, 2000),
    (1400, 2500),
    (1200, 3000),
    (1800, 3500);

Dirask - content writing

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join