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
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
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
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.
4. What does RTF refer to?
a) Rich Text Format
b) Right Text Format
c) Rich Text Function
d) Right Text Function
View Answer
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
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().
6. Which function returns a reference to hash of row values?
a) fetchrow_array()
b) fetchrow_arrayref()
c) fetch()
d) fetchrow_hashref()
View Answer
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
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.
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
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.
To practice all areas of MySQL Database, here is complete set of 1000+ Multiple Choice Questions and Answers.
- Apply for Programming Internship
- Check Information Technology Books
- Practice Programming MCQs
- Check MySQL Books