- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What MySQL returns if we provide value larger than 255 as argument to MySQL CHAR() function?
MySQL converts the arguments of CHAR() function which is greater than 255 to multiple result bytes. For example, CHAR(260) is equivalent to CHAR(0,1,0,4). It can be more clear with the help of following statements −
mysql> Select HEX(CHAR(256)),HEX(CHAR(1,0)); +----------------+----------------+ | HEX(CHAR(256)) | HEX(CHAR(1,0)) | +----------------+----------------+ | 0100 | 0100 | +----------------+----------------+ 1 row in set (0.00 sec)
The above result set shows that CHAR(256) is equivalent to CHAR(1,0).
- Related Articles
- What happens if we provide NULL as an argument to MySQL CHAR() function?
- What MySQL returns if I provide a non-hexadecimal number as an argument to UNHEX() function?
- How MySQL SUBSTRING_INDEX() function returns the substring if we provide the negative value of the argument ‘count’?
- What MySQL ELT() function returns if we the index number, provided as an argument, is less than 1?
- What MySQL returns if we use UNIX_TIMESTAMP() function with no argument?
- What MySQL returns if we include time components along with date component as an argument to DATEDIFF() function?
- What MySQL returns if we include date components along with time component as an argument to TIMEDIFF() function?
- What MySQL ASCII() function returns if I will provide NULL to it?
- What MySQL returns if the argument of QUOTE() function is NULL?
- What MySQL ELT() function returns if the index number, provided as an argument, is higher than the number of strings?
- What MySQL returns if we use NULL, as both the arguments, as one of the argument and as a separator, in CONCAT_WS() function?
- What MySQL returns on passing an invalid string as an argument to STR_TO_DATE() function?
- What MySQL returns if the first argument of INTERVAL() function is NULL?
- What MySQL EXPORT_SET() function returns if any of the argument is NULL?
- What MySQL returns if the list of strings, provided as argument in FIELD() function, are NULL?

Advertisements