Centinaia di funzioni… per avere un quadro completo è meglio consultare il sito ufficiale http://www.mysql.com
Conversioni
CAST(e AS t) CONVERT(e, t) | converte l’espressione e nel tipo t |
Il tipo: BINARY BINARY(n) CHAR CHAR(n) DATE DATETIME TIME DECIMAL DECIMAL(M) DECIMAL(M, D) SIGNED UNSIGNED SIGNED INTEGER UNSIGNED INTEGER
Crittografia
ENCODE(s, k) DECODE(s, k) | Cripta e decripta la stringa s utilizzando la chiave k |
AES_ENCRYPT(s, k) AES_DECRYPT(s, k) | Algoritmo ufficiale AES (Advanced Encryption Standard) |
DES_ENCRYPT() DES_DECRYPT() | Algoritmo Triple-DES, funziona solo con supporto SSL |
MD5(s) | Algoritmo RSA Data Security, Inc. MD5 Message-Digest |
SHA(s) SHA1(s) | Algoritmo SHA (Secure Hash Algorithm), simile a MD5 |
PASSWORD(s) | La funzione di autenticazione utilizzata dal server MySQL |
OLD_PASSWORD(s) | Compatibilità con pre-4.1 |
Ancora: ENCRYPT()
Compressione
COMPRESS(s) UNCOMPRESS(s) | Richiede zlib |
UNCOMPRESSED_LENGTH(s) | lunghezza della stringa s prima della compressione |
Informazioni
DATABASE() SCHEMA() | nome del database attuale |
LAST_INSERT_ID() | il valore del campo di tipo AUTOINCREMENT dopo l’ultima INSERT |
USER() SESSION_USER() SYSTEM_USER() | attuale username e hostname |
VERSION() | versione di MySQL |
ROW_COUNT() | Restituisce il numero di righe coinvolte da un’operazione di manipolazione UPDATE / INSERT / DELETE. Simile a mysql_affected_rows(). |
FOUND_ROWS() | … |
Ancora: BENCHMARK() CHARSET() COERCIBILITY() COLLATION() CONNECTION_ID()