Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
modul:m290:learningunits:lu07:loesungen:l02 [2024/10/01 09:08] – vdemir | modul:m290:learningunits:lu07:loesungen:l02 [2024/10/17 12:44] (aktuell) – vdemir | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
- | ====== | + | ====== |
- | ===== Requirements | + | ===== A: Separate INSERT statements |
- | * Work type: Individual | + | Below you will find ten lines with employee |
- | * Timeframe: 15 Minutes | + | |
- | * Means of aid: | + | |
- | * Only teaching materials, no websearch, no use of ai. | + | |
- | * Expected Result: | + | |
- | * At least 30 rows of employees | + | |
- | * 10 of the 30 rows are inserted | + | |
- | * 20 of the 30 rows are inserted with one single SQL statement. | + | |
- | ===== Assignments ===== | + | |
- | + | ||
- | ==== A: Separate INSERT statements ==== | + | |
- | Below you will find ten lines with employee data that you should insert into the ‘Employees’ table, but with 10 separate INSERT commands. | + | |
- | + | ||
- | INSERT INTO EMPLOYEES (employee_id, | + | |
VALUES (1, ' | VALUES (1, ' | ||
INSERT INTO EMPLOYEES (employee_id, | INSERT INTO EMPLOYEES (employee_id, | ||
Zeile 39: | Zeile 27: | ||
VALUES (11, ' | VALUES (11, ' | ||
- | ==== B: One single INSERT statement ==== | + | ===== B: One single INSERT statement |
- | After inserting 10 lines of data with 10 separate SQL commands, the next step is to do the import with one single SQL commands, which is basicly more compact and more efficient, that the first approach. Insert the following 20 lines of data into the table " | + | ... Insert the following 20 lines of data into the table " |
- | | + | |
+ | INSERT INTO EMPLOYEES (employee_ID, | ||
VALUES | VALUES | ||
(11, ' | (11, ' | ||
Zeile 63: | Zeile 52: | ||
(29, ' | (29, ' | ||
(30, ' | (30, ' | ||
- | ===== Solution ===== | + | |
- | [[modul: | + | The result after the import of all 30 rows should look like in Webstorm the image below. As you can see, the select on the table " |
+ | |||
+ | {{:modul: | ||
===== Vocabulary ===== | ===== Vocabulary ===== |