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:04 [2024/09/30 12:49] vdemirmodul:m290:learningunits:lu07:theorie:04 [2024/10/17 13:49] (aktuell) vdemir
Zeile 1: Zeile 1:
-====== LU07d - SQL-DML: DELETE ======+====== LU08d - SQL-DML: DELETE ======
  
 **Sources:** **Sources:**
   * [[https://www.w3schools.com/sql/sql_delete.asp | W3Schools | DELETE ]]   * [[https://www.w3schools.com/sql/sql_delete.asp | W3Schools | DELETE ]]
  
 +===== 3. DELETE Statement =====
 +The DELETE command is used to remove records from a table. Like UPDATE, it can be run with or without a filter, making it vital to define the condition to avoid unintended data removal.
 +
 +===== DELETE with Filter (WHERE Clause) =====
 +Using a WHERE clause ensures that only specific rows matching the condition will be deleted.
 +
 +**Syntax:**
 +  DELETE FROM table_name 
 +  WHERE condition;
 +
 +**Example**
 +  DELETE FROM employees 
 +  WHERE employee_id = 1;
      
 +  
 +===== DELETE without Filter =====
 +Omitting the WHERE clause removes all data from the table, so it must be used cautiously. This operation doesn’t remove the table structure, just the rows.
 +
 +**Syntax:**
 +  DELETE FROM table_name;
 +
 +**Example:**
 +  DELETE FROM employees;
 +
 +
  
 ==== Vocabulary ==== ==== Vocabulary ====
  • modul/m290/learningunits/lu07/theorie/04.1727693390.txt.gz
  • Zuletzt geändert: 2024/09/30 12:49
  • von vdemir