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






DATETIME DEFAULT '1999-12-31 23:59:59'

 
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>

        








Related examples in the same category