DATETIME DEFAULT '1999-12-31 23:59:59' : DATETIME « Procedure Function « MySQL Tutorial






mysql>
mysql> delimiter $$
mysql>
mysql> CREATE PROCEDURE myProc()
    -> BEGIN
    ->      DECLARE l_datetime  DATETIME DEFAULT '1999-12-31 23:59:59';
    ->
    ->     select l_datetime;
    -> END$$
Query OK, 0 rows affected (0.00 sec)

mysql> delimiter ;
mysql>
mysql> call myProc();
+---------------------+
| l_datetime          |
+---------------------+
| 1999-12-31 23:59:59 |
+---------------------+
1 row in set (0.02 sec)

Query OK, 0 rows affected (0.02 sec)

mysql>
mysql> drop procedure myProc;
Query OK, 0 rows affected (0.00 sec)

mysql>
mysql>
mysql>








11.23.DATETIME
11.23.1.DATETIME DEFAULT '1999-12-31 23:59:59'