Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
modul:m290:learningunits:lu07:aufgaben:04 [2024/10/01 11:47] – angelegt vdemir | modul:m290:learningunits:lu07:aufgaben:04 [2024/10/17 13:47] (aktuell) – vdemir | ||
---|---|---|---|
Zeile 1: | Zeile 1: | ||
- | ====== | + | ====== |
===== Requirements | ===== Requirements | ||
Zeile 11: | Zeile 11: | ||
After selecting data in assignment A1 and updating it in A2, it is about time to turn to how to delete data from the table. | After selecting data in assignment A1 and updating it in A2, it is about time to turn to how to delete data from the table. | ||
- | ==== A: Delete | + | ==== A: Delete |
Sarah Johnson has left the company and is therefore to be deleted from the table. Formulate the according DML DELETE statement. | Sarah Johnson has left the company and is therefore to be deleted from the table. Formulate the according DML DELETE statement. | ||
Zeile 25: | Zeile 25: | ||
{{: | {{: | ||
- | ==== B: Delete | + | ==== B: Delete |
It is common, that we retire when reaching a certain age. Remove all date from individuals who are older than 60 from the employees table. | It is common, that we retire when reaching a certain age. Remove all date from individuals who are older than 60 from the employees table. | ||
Hint: Before performing the deletion, make sure that you got the right resultset. | Hint: Before performing the deletion, make sure that you got the right resultset. | ||
+ | Content of the table before deleting the concerned resultset: | ||
- | SELECT * FROM employees | + | {{: |
- | WHERE birthdate | + | |
+ | | ||
+ | WHERE birthdate | ||
+ | |||
+ | DELETE FROM employees | ||
+ | WHERE birthdate < ' | ||
+ | |||
+ | The result is visible in the next image below: | ||
+ | |||
+ | {{: | ||
===== Solution ===== | ===== Solution ===== | ||
- | [[modul: | + | [[modul: |
===== Vocabulary ===== | ===== Vocabulary ===== | ||
^ English ^ German ^ | ^ English ^ German ^ | ||
- | | be about time | ist höchste Zeit | | + | | ... | ... | |
- | | subsequently | | + | |
---- | ---- | ||
[[https:// | [[https:// |