<pre>CREATE DEFINER = 'root'@'localhost' PROCEDURE db.Hello( ) BEGIN DECLARE @Text VARCHAR(MAX); SET @Text = 'hello'; END
DECLARE @Text VARCHAR(65535);
DECLARE variable_name datatype(size) [DEFAULT default_value];
Quote: Values in VARCHAR columns are variable-length strings. The length can be specified as a value from 0 to 65,535. The effective maximum length of a VARCHAR is subject to the maximum row size (65,535 bytes, which is shared among all columns) and the character set used. See Section 8.4.7, “Limits on Table Column Count and Row Size”. In contrast to CHAR, VARCHAR values are stored as a 1-byte or 2-byte length prefix plus data. The length prefix indicates the number of bytes in the value. A column uses one length byte if values require no more than 255 bytes, two length bytes if values may require more than 255 bytes.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)