CHARSET
CHARSET
In MySQL, during the creation of table We may specify the Engine and Charset of the table. Defaultly MySQL set the Charset as latin1 for characters. binary for numericals, utf8 for alphanumeric, etc.,
Syntax:
CHARSET(str)
It returns the character set of the string argument.
Example:
SELECT CHARSET(’abc’);
‘latin1′
SELECT CHARSET(CONVERT(’abc’ USING utf8));
‘utf8′
SELECT CHARSET(USER());
‘utf8′
SELECT CHARSET(5);
‘binary’
SELECT CHARSET(now());
‘binary’
