-
Notifications
You must be signed in to change notification settings - Fork 0
[feature Issue 1] 임시 데이터 관련 DDL DML
Minseob Kim edited this page Apr 26, 2021
·
1 revision
-- Example Table DDL --
CREATE TABLE `member`
(
`id` BIGINT NOT NULL AUTO_INCREMENT,
`name` VARCHAR(255) NOT NULL,
`ranking` INT(11) DEFAULT 0,
PRIMARY KEY (`id`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8;
CREATE TABLE `grass`
(
`id` BIGINT NOT NULL AUTO_INCREMENT,
`member_id` BIGINT NOT NULL,
`date` DATETIME NOT NULL,
`complete_count` INT(10),
PRIMARY KEY (`id`),
FOREIGN KEY (`member_id`) REFERENCES `member` (`id`)
) ENGINE = InnoDB
DEFAULT CHARSET = utf8;
-- Example Tuple Insert --
INSERT INTO member (name)
VALUES ('kiki');
INSERT INTO member (name)
VALUES ('hyuk');
INSERT INTO member (name)
VALUES ('seob');
INSERT INTO member (name)
VALUES ('jong');
INSERT INTO member (name)
VALUES ('bae');
INSERT INTO member (name)
VALUES ('hoi');
INSERT INTO member (name)
VALUES ('chang');
INSERT INTO member (name)
VALUES ('seok');
INSERT INTO member (name)
VALUES ('we');
INSERT INTO member (name)
VALUES ('sim');
INSERT INTO member (name)
VALUES ('seob');
INSERT INTO member (name)
VALUES ('jong');
INSERT INTO member (name)
VALUES ('bae');
INSERT INTO member (name)
VALUES ('park');
INSERT INTO member (name)
VALUES ('jeong');
INSERT INTO member (name)
VALUES ('aaaaa');
INSERT INTO member (name)
VALUES ('bbbbb');
INSERT INTO member (name)
VALUES ('ccccc');
INSERT INTO member (name)
VALUES ('ddddd');
INSERT INTO member (name)
VALUES ('eeeee');
INSERT INTO member (name)
VALUES ('fffff');
INSERT INTO member (name)
VALUES ('ggggg');
INSERT INTO member (name)
VALUES ('hhhhh');
INSERT INTO member (name)
VALUES ('iiiii');
INSERT INTO member (name)
VALUES ('jjjjj');
INSERT INTO member (name)
VALUES ('kkkkk');
INSERT INTO member (name)
VALUES ('lllll');
INSERT INTO member (name)
VALUES ('mmmmm');
INSERT INTO member (name)
VALUES ('nnnnn');
INSERT INTO member (name)
VALUES ('ooooo');
INSERT INTO member (name)
VALUES ('ppppp');
INSERT INTO member (name)
VALUES ('qqqqq');
INSERT INTO grass (member_id, date, complete_count)
VALUES (1, now(), 1);
INSERT INTO grass (member_id, date, complete_count)
VALUES (1, now(), 23);
INSERT INTO grass (member_id, date, complete_count)
VALUES (2, now(), 2);
INSERT INTO grass (member_id, date, complete_count)
VALUES (2, now(), 31);
INSERT INTO grass (member_id, date, complete_count)
VALUES (2, now(), 3);
INSERT INTO grass (member_id, date, complete_count)
VALUES (3, now(), 19);
INSERT INTO grass (member_id, date, complete_count)
VALUES (4, now(), 4);
INSERT INTO grass (member_id, date, complete_count)
VALUES (4, now(), 16);
INSERT INTO grass (member_id, date, complete_count)
VALUES (5, now(), 5);
INSERT INTO grass (member_id, date, complete_count)
VALUES (5, now(), 15);
INSERT INTO grass (member_id, date, complete_count)
VALUES (5, now(), 6);
INSERT INTO grass (member_id, date, complete_count)
VALUES (5, now(), 13);
INSERT INTO grass (member_id, date, complete_count)
VALUES (6, now(), 7);
INSERT INTO grass (member_id, date, complete_count)
VALUES (7, now(), 11);
INSERT INTO grass (member_id, date, complete_count)
VALUES (7, now(), 8);
INSERT INTO grass (member_id, date, complete_count)
VALUES (8, now(), 9);
INSERT INTO grass (member_id, date, complete_count)
VALUES (9, now(), 9);
INSERT INTO grass (member_id, date, complete_count)
VALUES (9, now(), 7);
INSERT INTO grass (member_id, date, complete_count)
VALUES (9, now(), 10);
INSERT INTO grass (member_id, date, complete_count)
VALUES (10, now(), 5);
INSERT INTO grass (member_id, date, complete_count)
VALUES (10, now(), 11);
INSERT INTO grass (member_id, date, complete_count)
VALUES (11, now(), 3);
INSERT INTO grass (member_id, date, complete_count)
VALUES (12, now(), 12);
INSERT INTO grass (member_id, date, complete_count)
VALUES (13, now(), 1);
INSERT INTO grass (member_id, date, complete_count)
VALUES (14, now(), 13);
INSERT INTO grass (member_id, date, complete_count)
VALUES (15, now(), 30);
INSERT INTO grass (member_id, date, complete_count)
VALUES (16, now(), 14);
INSERT INTO grass (member_id, date, complete_count)
VALUES (17, now(), 29);
INSERT INTO grass (member_id, date, complete_count)
VALUES (18, now(), 15);
INSERT INTO grass (member_id, date, complete_count)
VALUES (19, now(), 28);
INSERT INTO grass (member_id, date, complete_count)
VALUES (20, now(), 16);
INSERT INTO grass (member_id, date, complete_count)
VALUES (21, now(), 27);
INSERT INTO grass (member_id, date, complete_count)
VALUES (22, now(), 17);
INSERT INTO grass (member_id, date, complete_count)
VALUES (23, now(), 26);
INSERT INTO grass (member_id, date, complete_count)
VALUES (24, now(), 18);
INSERT INTO grass (member_id, date, complete_count)
VALUES (25, now(), 25);
INSERT INTO grass (member_id, date, complete_count)
VALUES (26, now(), 19);
INSERT INTO grass (member_id, date, complete_count)
VALUES (27, now(), 23);
INSERT INTO grass (member_id, date, complete_count)
VALUES (28, now(), 20);
INSERT INTO grass (member_id, date, complete_count)
VALUES (29, now(), 22);
INSERT INTO grass (member_id, date, complete_count)
VALUES (30, now(), 21);