This is a read-only copy of the MariaDB Knowledgebase generated on 2024-11-14. For the latest, interactive version please visit https://mariadb.com/kb/.

LOWER

Sintassi

LOWER(str)

Spiegazione

Restituisce la stringa str con tutti i caratteri minuscoli, secondo la mappatura del set di caratteri corrente. Quello predefinito è latin1 (cp1252 West European).

mysql> SELECT LOWER('QUADRATICALLY');
        -> 'quadratically'

LOWER() (e UPPER()) non fa nulla quando viene usato con stringhe binarie (BINARY, VARBINARY e BLOB). Per sostituire le lettere maiuscole con le minuscole, occorre convertire la stringa binaria in una non binaria:

MariaDB [(none)]> SET @str = BINARY 'North Carolina';
Query OK, 0 rows affected (0.00 sec)

MariaDB [(none)]> SELECT LOWER(@str), LOWER(CONVERT(@str USING latin1));
+----------------+-----------------------------------+
| LOWER(@str)    | LOWER(CONVERT(@str USING latin1)) |
+----------------+-----------------------------------+
| North Carolina | north carolina                    |
+----------------+-----------------------------------+
1 row in set (0.00 sec)
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.