MySQL Questions and Answers – Operators

This set of MySQL Database Multiple Choice Questions & Answers (MCQs) focuses 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) >>
View Answer

Answer: b
Explanation: 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) >
View Answer

Answer: a
Explanation: 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
View Answer

Answer: c
Explanation: 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.
advertisement
advertisement

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

Answer: a
Explanation: 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()
View Answer

Answer: a
Explanation: 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().
Note: Join free Sanfoundry classes at Telegram or Youtube

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

Answer: d
Explanation: 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
View Answer

Answer: b
Explanation: 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.
advertisement

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
View Answer

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

Sanfoundry Global Education & Learning Series – MySQL Database.

advertisement

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

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.