Data Types
- The NUL (‘\0’) is same as the SQL NULL value.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
MySQL recognizes many escape sequences like other programming languages. An escape sequence begin with a backslash character. The ‘\0’ is different from NULL. It is a zero valued byte.
- x’ffff’ in decimal is ___________
-
View Hint View Answer Discuss in Forum
NA
Correct Option: A
In MySQL, string values are specified using the standard SQL notation x’val’. Here, val is pairs of hexadecimal digits ( ‘0’ through ‘ 9 ’ and ‘ a ’ through ‘ f ’). x’ffff’ is 65536 in decimal.
- X’61626364′ and X’61626364′ are respectively __________.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: C
In the numeric contexts, each hexadecimal number constant is treated as a number. Without adding a zero to it, a hexadecimal literal is treated as a string. Hence it is displayed as abcd.
- A BIT value in a result set is displayed as a binary string.
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
In MySQL, the BIT values in the result set are displayed as binary strings. In order to convert them to integers, either a zero is added or the ‘CAST()’ operator is used to cast them.
- Which mode is used to turn off the special meaning of backslash and treat it as an ordinary character?
-
View Hint View Answer Discuss in Forum
NA
Correct Option: B
To turn off the special meaning of backslash in MySQL, and treat it as an ordinary character, the SQL mode named NO_BACKSLASH_ESCAPES is enabled. The escape sequence is treated as characters.