Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
modul:m290:learningunits:lu07:theorie:01 [2024/09/30 11:37] vdemirmodul:m290:learningunits:lu07:theorie:01 [2024/10/17 12:46] (aktuell) vdemir
Zeile 1: Zeile 1:
-====== LU07a - SQL-DML: Basics ======+====== LU08a - SQL-DML: Basics ======
  
 ===== 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 (DDL commands). The three main operations are:
  
   - 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**, affecting either specific rows or all rows within a table. Each of these commands can be executed **with or without filtering conditions**, affecting either specific rows or all rows within a table.
  
-==== 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 data in relational databasesThe INSERT, UPDATEand DELETE commands can all be customized with filters to ensure that specific data is targeted for modification or removalCareful use of these commands, particularly when filtering conditions are omitted, is critical for maintaining data integrity within database.
- +
-** Syntax ** +
-  INSERT INTO table_name (column1column2column3)  +
-  VALUES (value1, value2, value3); +
-   +
-** Example ** +
-  INSERT INTO employees (employee_id, first_name, last_name, hire_date, salary)  +
-  VALUES (1, 'John', 'Doe', '2023-09-18', 55000); +
- +
-==== 2. UPDATE Statement ==== +
-The UPDATE command is used to modify existing data in a table. It can be executed with or without a WHERE clause, depending on whether you want to update specific rows or all rows. +
- +
-=== 2.1 UPDATE with Filter (WHERE Clause) === +
-Using WHERE clause allows you to target specific rows to updateThis 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://creativecommons.org/licenses/by-nc-sa/4.0/|{{https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png}}]] Volkan Demir [[https://creativecommons.org/licenses/by-nc-sa/4.0/|{{https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png}}]] Volkan Demir
  
  • modul/m290/learningunits/lu07/theorie/01.1727689045.txt.gz
  • Zuletzt geändert: 2024/09/30 11:37
  • von vdemir