|
1 |
| -insert into author (age, name, genre, id) values (23, "Mark Janel", "Anthology", 1); |
2 |
| -insert into author (age, name, genre, id) values (51, "Quartis Young", "Anthology", 2); |
3 |
| -insert into author (age, name, genre, id) values (38, "Alicia Tom", "Anthology", 3); |
4 |
| -insert into author (age, name, genre, id) values (56, "Katy Loin", "Anthology", 4); |
5 |
| -insert into author (age, name, genre, id) values (38, "Martin Leon", "Anthology", 5); |
6 |
| -insert into author (age, name, genre, id) values (56, "Qart Pinkil", "Anthology", 6); |
| 1 | +-- insert authors |
| 2 | +INSERT INTO author (`age`, `name`, `genre`, `id`) VALUES (23, "Mark Janel", "Anthology", 1); |
| 3 | +INSERT INTO author (`age`, `name`, `genre`, `id`) VALUES (51, "Quartis Young", "Anthology", 2); |
| 4 | +INSERT INTO author (`age`, `name`, `genre`, `id`) VALUES (38, "Alicia Tom", "Anthology", 3); |
| 5 | +INSERT INTO author (`age`, `name`, `genre`, `id`) VALUES (56, "Katy Loin", "Anthology", 4); |
| 6 | +INSERT INTO author (`age`, `name`, `genre`, `id`) VALUES (38, "Martin Leon", "Anthology", 5); |
| 7 | +INSERT INTO author (`age`, `name`, `genre`, `id`) VALUES (56, "Qart Pinkil", "Anthology", 6); |
7 | 8 |
|
8 |
| -insert into book (isbn, title, id) values ("001-all", "Encyclopedia", 1); |
| 9 | +-- insert books |
| 10 | +INSERT INTO book (`isbn`, `title`, `id`) VALUES ("001-all", "Encyclopedia", 1); |
9 | 11 |
|
10 |
| -insert into author_book (author_id, book_id) values (1, 1); |
11 |
| -insert into author_book (author_id, book_id) values (2, 1); |
12 |
| -insert into author_book (author_id, book_id) values (3, 1); |
13 |
| -insert into author_book (author_id, book_id) values (4, 1); |
14 |
| -insert into author_book (author_id, book_id) values (5, 1); |
15 |
| -insert into author_book (author_id, book_id) values (6, 1); |
| 12 | +-- insert in the junction table |
| 13 | +INSERT INTO author_book (`author_id`, `book_id`) VALUES (1, 1); |
| 14 | +INSERT INTO author_book (`author_id`, `book_id`) VALUES (2, 1); |
| 15 | +INSERT INTO author_book (`author_id`, `book_id`) VALUES (3, 1); |
| 16 | +INSERT INTO author_book (`author_id`, `book_id`) VALUES (4, 1); |
| 17 | +INSERT INTO author_book (`author_id`, `book_id`) VALUES (5, 1); |
| 18 | +INSERT INTO author_book (`author_id`, `book_id`) VALUES (6, 1); |
0 commit comments