Variable type NUMERIC(8,2)
|
mysql> mysql> delimiter $$ mysql> CREATE PROCEDURE myProc() -> BEGIN -> DECLARE my_currency NUMERIC(8,2); /* Number with 2 decimals*/ -> -> set my_currency = 123123.123; -> -> select "my_currency="+my_currency; -> END$$ Query OK, 0 rows affected (0.00 sec)
mysql> delimiter ; mysql> mysql> call myProc(); +----------------------------+ | "my_currency="+my_currency | +----------------------------+ | 123123.12 | +----------------------------+ 1 row in set (0.00 sec)
Query OK, 0 rows affected, 2 warnings (0.00 sec)
mysql> mysql> drop procedure myProc; Query OK, 0 rows affected (0.00 sec)
mysql> mysql>
|
|
|
|
|
Related Scripts with Example Source Code in same category :
-
|
|