250+ TOP MCQs on Operators and Answers

MySQL Database Multiple Choice Questions on “Operators”.

1. Which operator is used to return value from JSON columns after evaluating the path and unquoting the result?
a) ->
b) ->>
c) <<
d) >>

Answer: b
Clarification: The operator ‘–>>’ is used to return values from JSON columns after evaluating the path and unquoting the result. It is equivalent to the function ‘JSON_UNQUOTE(JSON_EXTRACT())’.

2. The right shift operator is _____________
a) >>
b) <<
c) <
d) >

Answer: a
Clarification: The right shift operator is ‘>>’. It is used to shift the bits of a number towards the right. The left shift operator is ‘<<‘. It is used to shift the bits of a number to the left.

3. Which operator compares sounds?
a) MATCH SOUNDS
b) CHECK SOUNDS
c) SOUNDS LIKE
d) SOUNDS SIMILAR

Answer: c
Clarification: The operator ‘SOUNDS LIKE’ is used to compare the sound. The ‘RLIKE’ is a synonym for ‘REGEXP’, which is a pattern matching using regular expressions. There are a lot of other operators for use.

4. What does RTF refer to?
a) Rich Text Format
b) Right Text Format
c) Rich Text Function
d) Right Text Function

Answer: a
Clarification: RTF (Rich Text Format) is a format developed by Microsoft that is understood by many word processors. MS-Word is one such program. Many others such as ‘OpenOffice’ understand it too.

5. Which function returns an array of row values?
a) fetchrow_array()
b) fetchrow_arrayref()
c) fetch()
d) fetchrow_hashref()

Answer: a
Clarification: The function ‘fetchrow_array()’ returns an array of row values. ‘fetchrow_arrayref()’ returns a reference to an array of row values. ‘fetch()’ is the same as fetchrow_arrayref().

  250+ TOP MCQs on Condition Types and Answers

6. Which function returns a reference to hash of row values?
a) fetchrow_array()
b) fetchrow_arrayref()
c) fetch()
d) fetchrow_hashref()

Answer: d
Clarification: The function ‘fetchrow_hashref()’ returns reference to hash of row values. ‘fetchrow_arrayref()’ returns a reference to an array of row values. ‘fetch()’ is the same as fetchrow_arrayref().

7. ‘fetchrow_hashref()’ returns a reference to the hash of row values keyed by what?
a) row name
b) column name
c) table name
d) database name

Answer: b
Clarification: The function ‘fetchrow_hashref()’ returns a reference to the hash of row values, keyed by the column name. The function ‘fetchrow_arrayref()’ returns a reference to an array of row values.

8. The maximum non zero value for FLOAT is ______________
a) 3.402823466E+38
b) 3.402823466E+37
c) 3.402823466E+39
d) 3.402823466E+35

Answer: a
Clarification: In MySQL, each datatype has its own range. Data types give an idea of the kind of values and the ranges that a variable is allowed to store. The maximum non zero value for FLOAT is 3.402823466E+38.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top