MySQL Character Set
- Which collations does this statement list?
SHOW COLLATION LIKE 'utf8%'
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
The character set ‘utf8’ is used for the Unicode character set 8. The ‘LIKE’ keyword does the job of narrowing the search space to refer to only those names that begin with ‘utf8’.
- Which statement is used to find out which character sets are available?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
It is simple to determine the character sets and collations that are available in MySQL. ‘SHOW CHARACTER SET’ shows the character sets while ‘SHOW COLLATION’ shows the collations.
- Which clause can be used to sort string values according to a specific collation?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
The ‘COLLATE’ operator can be used to sort the string values according to a specific collation. For example, ‘SELECT col FROM tbl ORDER BY col COLLATE latin1_swedish_ci’ sorts by swedish collation.
- Unicode support is provided in MySQL.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
In MySQL, Unicode character set support is provided by the utf8 and ucs2 character sets. There are further additional character sets available as of MySQL version 6.0.4.
- What is the maximum collations a character set can have?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
The MySQL server allows simultaneous use of multiple character sets. A given character set is allowed to have one or more collations. It can be chosen according to the need of the database.