Table of Contents
Why is there a 256 character limit?
The limit occurs due to an optimization technique where smaller strings are stored with the first byte holding the length of the string. Since a byte can only hold 256 different values, the maximum string length would be 255 since the first byte was reserved for storing the length. By default, the maximum is 524,288 characters. Regardless, the ‘word’ limit is 47 lines of text, or 4000 characters. This equates to (roughly) 500 words. The length of a CHAR column is fixed to the length that you declare when you create the table. The length can be any value from 0 to 255. Answer: 320 characters is between 45 words and 80 words with spaces included in the character count. If spaces are not included in the character count, then 320 characters is between 53 words and 107 words.
What is 255 character limit?
The limit occurs due to an optimization technique where smaller strings are stored with the first byte holding the length of the string. Since a byte can only hold 256 different values, the maximum string length would be 255 since the first byte was reserved for storing the length. The 160-character limit is for messages encoded using the GSM-7 character set. Messages not encoded with GSM-7 are limited to 70 characters. For detail on how these character limits change on concatenated (multi-segment) messages, see below. CHAR is conceptually a fixed-length, blank-padded string. Trailing blanks (spaces) are removed on input, and are restored on output. The default length is 1, and the maximum length is 65000 octets (bytes). Answer: 300 characters is between 42 words and 75 words with spaces included in the character count. If spaces are not included in the character count, then 300 characters is between 50 words and 100 words. Answer: 900 characters is between 128 words and 225 words with spaces included in the character count. If spaces are not included in the character count, then 900 characters is between 150 words and 300 words.