TEXT type variable : TEXT « Procedure Function « SQL / MySQL






TEXT type variable

 
mysql>
mysql> delimiter $$
mysql>
mysql> CREATE PROCEDURE myProc()
    -> BEGIN
    ->     DECLARE my_text        TEXT;          /* huge  text */
    ->
    ->     set my_text = 'www.java2s.com';
    ->
    ->     select my_text;
    -> END$$
Query OK, 0 rows affected (0.00 sec)

mysql> delimiter ;
mysql>
mysql> call myProc();
+----------------+
| my_text        |
+----------------+
| www.java2s.com |
+----------------+
1 row in set (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

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

mysql>
mysql>

        








Related examples in the same category

1.TEXT variable with DEFAULT value