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:theorie:01 [2024/09/30 11:37] – vdemir | modul:m290:learningunits:lu07:theorie:01 [2024/10/17 12:46] (aktuell) – vdemir | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| - | ====== | + | ====== |
| ===== Learning Objectives ===== | ===== Learning Objectives ===== | ||
| Zeile 11: | Zeile 11: | ||
| ===== Overview of MySQL DML ===== | ===== Overview of MySQL DML ===== | ||
| - | MySQL DML is used to manage the data in tables, as opposed to the structure of the tables themselves. The three main operations are: | + | MySQL DML is used to manage the data in tables, as opposed to the structure of the tables themselves |
| - INSERT: Used to add new records to a table. | - INSERT: Used to add new records to a table. | ||
| Zeile 19: | Zeile 19: | ||
| Each of these commands can be executed **with or without filtering conditions**, | Each of these commands can be executed **with or without filtering conditions**, | ||
| - | ==== INSERT Statement | + | ===== Conclusion ===== |
| - | The INSERT command is used to add new records to a table. When using INSERT, it is essential to specify the table and columns where the data will be added. | + | MySQL DML commands provide robust mechanisms for managing |
| - | + | ||
| - | ** Syntax ** | + | |
| - | | + | |
| - | VALUES (value1, value2, value3); | + | |
| - | + | ||
| - | ** Example ** | + | |
| - | INSERT INTO employees (employee_id, | + | |
| - | VALUES (1, ' | + | |
| - | + | ||
| - | ==== 2. UPDATE Statement ==== | + | |
| - | The UPDATE command is used to modify existing data in a table. It can be executed | + | |
| - | + | ||
| - | === 2.1 UPDATE with Filter (WHERE Clause) === | + | |
| - | Using a WHERE clause allows you to target specific rows to update. This ensures that only rows meeting a certain condition are modified. | + | |
| - | + | ||
| - | **Syntax** | + | |
| - | UPDATE table_name | + | |
| - | SET column1 = value1, column2 = value2 | + | |
| - | WHERE condition; | + | |
| - | + | ||
| - | **Example** | + | |
| - | UPDATE employees | + | |
| - | SET salary = 60000 | + | |
| - | WHERE employee_id = 1; | + | |
| - | + | ||
| - | + | ||
| ==== Vocabulary ==== | ==== Vocabulary ==== | ||
| Zeile 54: | Zeile 27: | ||
| | according | gemäss | | | according | gemäss | | ||
| | opposed to | im Gegensatz zu | | | opposed to | im Gegensatz zu | | ||
| + | | to omit | auslassen | | ||
| + | | to customize | (bedarfsgerecht) anpassen | | ||
| ---- | ---- | ||
| [[https:// | [[https:// | ||