Mysql Setup
- The collations this statement lists are ______________.
SHOW COLLATION LIKE 'utf8%'
-
View Hint View Answer Discuss in Forum
NA
Correct Option: D
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’.
- The statement used to find out which character sets are available is ______________.
-
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.
- The clause that can be used to sort string values according to a specific collation is ______________.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
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.
- What does comparing a known value with NULL result into?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
In MySQL, NULL is not comparable to other known values. It will result in a NULL when compared to any value. The following statement would result in four NULLs: ‘SELECT NULL = 0, NULL < 0, NULL <> 0, NULL > 0’.
- Which clause is used to sort query elements?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
An ‘ORDER BY’ clause specifies the sort order. The data is sorted in ascending order by default. To sort in descending order, the keyword DESC is appended to the ‘ORDER BY’ clause. ‘GROUP BY’ is used to group the query results according to a criteria.