This set of MySQL Database Multiple Choice Questions & Answers (MCQs) focuses on “Data Value Categories – 1”.

1. Numbers prefixed with ‘0x’ are in base __________

a) 8

b) 16

c) 32

d) 64

View Answer

Explanation: In MySQL, there are many numeric datatypes. They include integers and floating points. For example, 34, 12.3, -1.3E11. The numbers that are prefixed with ‘0x’ are in hexadecimal.

2. Hexadecimal numbers cannot be used in scientific notation.

a) True

b) False

View Answer

Explanation: The scientific notation for real numbers is possible in MySQL. Approximate values are represented as floating point numbers in scientific notation. It consists of a mantissa and exponent.

3. The mantissa in -1.58E5 is __________

a) -1.58

b) 1.58

c) E

d) 5

View Answer

Explanation: In MySQL, the scientific notation for real numbers is possible. Some values are represented as floating point numbers in scientific notation consisting of a mantissa and exponent.

4. The BIGINT precision is of bit _________

a) 32

b) 64

c) 128

d) 16

View Answer

Explanation: In MySQL, for the expressions containing only exact values that are all integers, the evaluation uses BIGINT (64 – bit) precision. MySQL evaluates expressions using exact/approximate math.

5. The DECIMAL used for expressions containing only exact values with fractional part is of digit precision _________

a) 32

b) 64

c) 65

d) 16

View Answer

Explanation: In MySQL, for the expressions containing only exact values and where one or more values have a fractional part, the DECIMAL arithmetic is used with digits of precision equal to 65.

6. If a string is to be converted to a number, it is converted into a _____________

a) double precision floating point

b) single precision floating point

c) decimal integer

d) hexadecimal integer

View Answer

Explanation: When there is a need to convert a string to a number to evaluate an expression, it is first converted to a double precision floating point value. Then, it can be used to do arithmetic.

7. The bit-field values are prefixed with __________

a) 0b

b) 0bit

c) bit-

d) ‘bit’

View Answer

Explanation: In MySQL, the bit-field values can be either written as b’value’ or 0bvalue. Here, value is a sequence of digits zero or/and one. For example, b’1010′ and 0b1010 are decimal value 10.

8. A BIT value in a result set is displayed as a binary string.

a) True

b) False

View Answer

Explanation: 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.

9. ‘2341’ is a ____________

a) integer

b) floating point

c) hexadecimal

d) string

View Answer

Explanation: In MySQL, the string values are written by enclosing them within quotes. Values like ‘Alexander’, ‘Kolkata, India’ and ‘2341’ are strings. ‘2341’ looks like an integer but is a string.

10. If ANSI_QUOTES is enabled, MySQL treats the double quotes as ________________

a) identifier-quoting character

b) string-quoting character

c) hexadecimal

d) string

View Answer

Explanation: The SQL standard specifies the single quotes so that statements are portable across database engines. If ANSI_QUOTES is enabled, MySQL treats the double quotes as identifier-quoting character.

**Sanfoundry Global Education & Learning Series – MySQL Database.**

To practice all areas of MySQL Database, __here is complete set of 1000+ Multiple Choice Questions and Answers__.