DATE
Sintassi
DATE
Spiegazione
Una data. I valori ammessi vanno da '1000-01-01
' a '9999-12-31
'. MariaDB
mostra i valori DATE
nel formato 'YYYY-MM-DD
', ma permette di assegnarli alle colonne DATE
utilizzando sia stringhe sia numeri.
Esempi
MariaDB [test]> CREATE TABLE t1 (d DATE); Query OK, 0 rows affected (0.24 sec) MariaDB [test]> INSERT INTO t1 VALUES ("2011-1-12"), ("2011-02-28"); Query OK, 2 rows affected (0.19 sec) Records: 2 Duplicates: 0 Warnings: 0 MariaDB [test]> select * from t1; +------------+ | d | +------------+ | 2011-01-12 | | 2011-02-28 | +------------+ 2 rows in set (0.00 sec) MariaDB [test]>
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.