vault backup: 2026-07-23 09:25:21
This commit is contained in:
Vendored
+1
@@ -218,6 +218,7 @@
|
|||||||
},
|
},
|
||||||
"active": "25f5b25d5eca7203",
|
"active": "25f5b25d5eca7203",
|
||||||
"lastOpenFiles": [
|
"lastOpenFiles": [
|
||||||
|
"SS2026/Datenbanken und Informationssysteme/SQL/DML Data Manipulation Language SQL.md",
|
||||||
"SS2026/Datenbanken und Informationssysteme/SQL/Anhänge/sql_merged.pdf",
|
"SS2026/Datenbanken und Informationssysteme/SQL/Anhänge/sql_merged.pdf",
|
||||||
"SS2026/Datenbanken und Informationssysteme/SQL/SQL.md",
|
"SS2026/Datenbanken und Informationssysteme/SQL/SQL.md",
|
||||||
"SS2026/Datenbanken und Informationssysteme/SQL/DDL Data Definition Language SQL.md",
|
"SS2026/Datenbanken und Informationssysteme/SQL/DDL Data Definition Language SQL.md",
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
### INSERT
|
||||||
|
```
|
||||||
|
INSERT INTO <tabelle> (spalte1, spalte2, ...) VALUES (wert1, wert2, ...);
|
||||||
|
```
|
||||||
|
|
||||||
|
### UPDATE
|
||||||
|
```
|
||||||
|
UPDATE <tabelle> SET spalte1 = wert1, spalte2 = wert2, ... WHERE <bedingung>;
|
||||||
|
```
|
||||||
|
|
||||||
|
### DELETE
|
||||||
|
```
|
||||||
|
DELETE FROM <tabelle> WHERE <bedingung>;
|
||||||
|
```
|
||||||
@@ -15,12 +15,40 @@ Duplikate möglich!!!
|
|||||||
2. UPDATE
|
2. UPDATE
|
||||||
3. DELETE
|
3. DELETE
|
||||||
|
|
||||||
### INSERT
|
[[DML Data Manipulation Language SQL]]
|
||||||
|
|
||||||
|
|
||||||
|
| SQL | Argumente | Relationale Algebra |
|
||||||
|
| ---------- | ------------------ | ------------------- |
|
||||||
|
| **SELECT** | Liste von Namen | $\pi$ |
|
||||||
|
| **FROM** | Liste von Tabellen | $\times$ |
|
||||||
|
| **WHERE** | Bedingung | $\sigma$ |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### SELECT
|
||||||
```
|
```
|
||||||
INSERT INTO <tabelle> (spalte1, spalte2, ...) VALUES (wert1, wert2, ...);
|
SELECT MatrNr, Name, Semester from Student
|
||||||
```
|
```
|
||||||
|
|
||||||
### UPDATE
|
Spalte umbenennen
|
||||||
|
`SELECT MatrNr AS InsassenNr from Student`
|
||||||
|
|
||||||
|
Keine Duplikate
|
||||||
|
`SELECT DISTINCT Semester AS Jahrgänge from Student`
|
||||||
|
|
||||||
|
### WHERE
|
||||||
|
|
||||||
```
|
```
|
||||||
UPDATE <tabelle> SET spalte1 = wert1, spalte2 = wert2, ... WHERE <bedingung>;
|
SELECT * from Student WHERE Semester = 2
|
||||||
|
---
|
||||||
|
SELECT * from Student s WHERE s.Semester = 2 AND s.Name='Byleth'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### Anatomie einer WHERE Klausel
|
||||||
|
Vergleichsoperatoren: <,>,=,<=,>=,<>
|
||||||
|
BETWEEN
|
||||||
|
LIKE
|
||||||
|
IS NULL
|
||||||
|
AND, OR, NOT
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user