Kapitel 7-1

Schreiben Sie eine Abfrage, die das 17. bis 25. Zeichen des Strings »Please find the substring in this string« findet.

mysql> SELECT SUBSTRING('Please find the substring in this string',17,9);
+------------------------------------------------------------+
| SUBSTRING('Please find the substring in this string',17,9) |
+------------------------------------------------------------+
| substring                                                  |
+------------------------------------------------------------+
1 row in set (0.00 sec)

Kapitel 7-2

Schreiben Sie eine Abfrage, die den absoluten Wert und das Vorzeichen (−1, 0 oder 1) der Zahl −25.76823 findet. Geben Sie die Zahl außerdem auf das nächste Hundertstel gerundet zurück.

mysql> SELECT ABS(-25.76823), SIGN(-25.76823), ROUND(-25.76823, ...

Get Einführung in SQL now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.