InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
The facility that allows nesting one select statement into another is ______________(a) nesting(b) binding(c) subquerying(d) encapsulatingI got this question in an interview for job.The origin of the question is Functions in section Data Type Reference, Operators and Functions of MySQL |
|
Answer» Correct option is (c) subquerying |
|
| 2. |
The join in which all the rows from the right table appear in the output irrespective of the content of the other table is ______________(a) CARTESIAN JOIN(b) CROSS JOIN(c) INNER JOIN(d) RIGHT JOINI had been asked this question in examination.My doubt is from Functions in portion Data Type Reference, Operators and Functions of MySQL |
|
Answer» Right OPTION is (d) RIGHT JOIN |
|
| 3. |
What does the AUTO_INCREMENT sequences begin at by default?(a) 0(b) 1(c) -1(d) 2The question was posed to me by my school teacher while I was bunking the class.My question is from Functions in section Data Type Reference, Operators and Functions of MySQL |
|
Answer» The correct CHOICE is (B) 1 |
|
| 4. |
There cannot be more than one column per table with the AUTO_INCREMENT attribute.(a) True(b) FalseI got this question by my college professor while I was bunking the class.The origin of the question is Functions in portion Data Type Reference, Operators and Functions of MySQL |
|
Answer» CORRECT OPTION is (a) True To explain: In MYSQL, there can only be one COLUMN per table with the AUTO_INCREMENT attribute. It should ALSO have an integer data type. The AUTO_INCREMENT is also allowed for floating point types. |
|
| 5. |
CGI.pm does not support an object oriented style of use.(a) True(b) FalseThe question was asked in a national level competition.Question is from Functions topic in division Data Type Reference, Operators and Functions of MySQL |
|
Answer» Correct option is (b) False |
|
| 6. |
The string function that returns the index of the first occurrence of substring is _____________(a) INSERT()(b) INSTR()(c) INSTRING()(d) INFSTR()I got this question in examination.The origin of the question is Functions topic in section Data Type Reference, Operators and Functions of MySQL |
|
Answer» Correct choice is (B) INSTR() |
|
| 7. |
The operator that compares sounds is _____________(a) MATCH SOUNDS(b) CHECK SOUNDS(c) SOUNDS LIKE(d) SOUNDS SIMILARThe question was asked in exam.The question is from Functions topic in division Data Type Reference, Operators and Functions of MySQL |
|
Answer» The correct OPTION is (c) SOUNDS LIKE |
|
| 8. |
Which function returns NULL if expr1 = expr2?(a) CASE(b) IF()(c) IFNULL()(d) NULLIF()I had been asked this question during a job interview.I would like to ask this question from Functions topic in portion Data Type Reference, Operators and Functions of MySQL |
|
Answer» Right OPTION is (d) NULLIF() |
|
| 9. |
The server is told to accept spaces after function names by _____________(a) –sql-mode=SKIP_SPACE(b) –sql-mode=IGNORE_SPACE(c) –sql-mode=SPACE_IGNORE(d) –sql-mode=SPACE_SKIPI have been asked this question by my college director while I was bunking the class.Origin of the question is Functions topic in portion Data Type Reference, Operators and Functions of MySQL |
|
Answer» Correct answer is (b) –sql-mode=IGNORE_SPACE |
|
| 10. |
The maximum non zero value for FLOAT is ______________(a) 3.402823466E+38(b) 3.402823466E+37(c) 3.402823466E+39(d) 3.402823466E+35This question was addressed to me in an online quiz.I would like to ask this question from Operators in chapter Data Type Reference, Operators and Functions of MySQL |
|
Answer» Correct choice is (a) 3.402823466E+38 |
|
| 11. |
‘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 nameThis question was posed to me in a job interview.I need to ask this question from Operators in portion Data Type Reference, Operators and Functions of MySQL |
|
Answer» The correct option is (B) column name |
|
| 12. |
Which function returns a reference to hash of row values?(a) fetchrow_array()(b) fetchrow_arrayref()(c) fetch()(d) fetchrow_hashref()I had been asked this question in final exam.Question is taken from Operators topic in section Data Type Reference, Operators and Functions of MySQL |
|
Answer» The CORRECT answer is (d) fetchrow_hashref() |
|
| 13. |
Which function returns an array of row values?(a) fetchrow_array()(b) fetchrow_arrayref()(c) fetch()(d) fetchrow_hashref()The question was asked by my college director while I was bunking the class.My question is based upon Operators in portion Data Type Reference, Operators and Functions of MySQL |
|
Answer» Right choice is (a) fetchrow_array() |
|
| 14. |
What does RTF refer to?(a) Rich Text Format(b) Right Text Format(c) Rich Text Function(d) Right Text FunctionThe question was asked by my college professor while I was bunking the class.This intriguing question comes from Operators topic in chapter Data Type Reference, Operators and Functions of MySQL |
|
Answer» Correct ANSWER is (a) Rich Text Format |
|
| 15. |
Which operator compares sounds?(a) MATCH SOUNDS(b) CHECK SOUNDS(c) SOUNDS LIKE(d) SOUNDS SIMILARI got this question by my school teacher while I was bunking the class.Origin of the question is Operators topic in portion Data Type Reference, Operators and Functions of MySQL |
|
Answer» The correct answer is (c) SOUNDS LIKE |
|
| 16. |
The right shift operator is _____________(a) >>(b) |
|
Answer» CORRECT answer is (a) >> Easiest 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. |
|
| 17. |
Which operator is used to return value from JSON columns after evaluating the path and unquoting the result?(a) ->(b) ->>(c) I got this question in quiz.My question is from Operators topic in chapter Data Type Reference, Operators and Functions of MySQL |
|
Answer» CORRECT option is (b) ->> Best 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())’. |
|
| 18. |
In which mode is the indicator of the presence/absence of a word in search used?(a) Natural language(b) Boolean mode(c) Query expansion(d) Cross modeI got this question in an interview for internship.The origin of the question is Spatial Data Types topic in division Data Type Reference, Operators and Functions of MySQL |
|
Answer» RIGHT option is (b) Boolean mode Best explanation: A full text search CAPABILITY is provided in MySQL. It facilitates to look for WORDS or phrases without USING pattern-matching operations. Boolean search is one of the three modes. |
|
| 19. |
The mode of search is the search string parsed into words and the search looks for rows is ______________(a) Boolean mode(b) Natural language(c) Query expansion(d) Cross modeThis question was addressed to me in an interview for internship.The question is from Spatial Data Types in portion Data Type Reference, Operators and Functions of MySQL |
|
Answer» RIGHT option is (b) Natural language Easy explanation: In MYSQL, a FULL text search CAPABILITY is provided, which enables to look for words or phrases without using pattern-matching operations. There are THREE kinds of full text searches. |
|
| 20. |
What is the non handle array representing a row of values?(a) $rc(b) $rv(c) $rows(d) $aryThis question was addressed to me by my college director while I was bunking the class.Origin of the question is Spatial Data Types in division Data Type Reference, Operators and Functions of MySQL |
|
Answer» CORRECT answer is (d) $ary For explanation I would say: The Perl Non-handle variable ‘$ary’ is an array or list representing a row of values returned by a query. ‘$RC’ returns CODE from OPERATIONS that return TRUE or false. ‘$rv’ returns value from operations that return an integer. ‘$rows’ returns value from operations that return a row count. |
|
| 21. |
What is the generic handle whose meaning depends on context?(a) $dbh(b) $sth(c) $fh(d) $hI had been asked this question in an online interview.My query is from Spatial Data Types topic in section Data Type Reference, Operators and Functions of MySQL |
|
Answer» Right option is (d) $H |
|
| 22. |
MySQL does not automatically convert a date or time value to a number if the value is used in a numeric context.(a) True(b) FalseI had been asked this question in final exam.Question is taken from Spatial Data Types in section Data Type Reference, Operators and Functions of MySQL |
|
Answer» The CORRECT OPTION is (b) False |
|
| 23. |
SPATIAL indexes cannot be created on NOT NULL spatial columns.(a) True(b) FalseI have been asked this question in an international level competition.My enquiry is from Spatial Data Types topic in chapter Data Type Reference, Operators and Functions of MySQL |
|
Answer» Right answer is (b) False |
|
| 24. |
Which type can store a collection of objects of any type?(a) GEOMETRYCOLLECTION(b) MULTIPOINT(c) MULTILINESTRING(d) MULTIPOLYGONThe question was posed to me in final exam.Query is from Spatial Data Types topic in chapter Data Type Reference, Operators and Functions of MySQL |
|
Answer» The correct ANSWER is (a) GEOMETRYCOLLECTION |
|
| 25. |
Which classes does spatial data types in MySQL correspond to?(a) OpenGSS(b) OpenGIS(c) ClosedGSS(d) ClosedGISThis question was posed to me in a national level competition.This is a very interesting question from Spatial Data Types topic in portion Data Type Reference, Operators and Functions of MySQL |
|
Answer» The correct answer is (b) OpenGIS |
|
| 26. |
Which variable is a handle to a database object?(a) $dbh(b) $sth(c) $fh(d) $hI have been asked this question during an interview for a job.My question is based upon Date and Time Data Types topic in portion Data Type Reference, Operators and Functions of MySQL |
|
Answer» The correct choice is (a) $dbh |
|
| 27. |
The variable used as a handle to an open file is ______________(a) $dbh(b) $sth(c) $fh(d) $hThis question was posed to me in an online quiz.I would like to ask this question from Date and Time Data Types topic in portion Data Type Reference, Operators and Functions of MySQL |
|
Answer» The CORRECT answer is (c) $fh |
|
| 28. |
The functions in Perl DBI called?(a) functions(b) procedures(c) methods(d) programsThis question was posed to me by my college professor while I was bunking the class.Question is taken from Date and Time Data Types topic in section Data Type Reference, Operators and Functions of MySQL |
|
Answer» Correct answer is (c) methods |
|
| 29. |
MySQL automatically converts a date or time value to a number if the value is used in a numeric context.(a) True(b) FalseThis question was posed to me during a job interview.The query is from Date and Time Data Types in section Data Type Reference, Operators and Functions of MySQL |
|
Answer» The correct answer is (a) True |
|
| 30. |
The mode that does not remove trailing spaces when CHAR values are retrieved is _____________(a) PAD_CHAR_TO_FULL_LENGTH(b) TO_FULL_LENGTH_CHAR_PAD(c) CHAR_PAD_TO_FULL_LENGTH(d) PAD_CHAR_TO_LENGTHI have been asked this question in homework.Origin of the question is Date and Time Data Types topic in division Data Type Reference, Operators and Functions of MySQL |
|
Answer» Correct answer is (a) PAD_CHAR_TO_FULL_LENGTH |
|
| 31. |
To disallow zero month or day parts in dates, the option used is _____________(a) NO_ZERO_IN_DATE(b) NO_DATE_WITH_ZERO(c) ZERO_IN_DATE(d) DATE_WITH_ZEROThis question was addressed to me in an internship interview.This intriguing question comes from Date and Time Data Types topic in chapter Data Type Reference, Operators and Functions of MySQL |
|
Answer» The CORRECT answer is (a) NO_ZERO_IN_DATE |
|
| 32. |
Which of these has special automatic update behavior?(a) DATE(b) TIME(c) TIMESTAMP(d) YEARThis question was posed to me in an online quiz.I need to ask this question from Date and Time Data Types topic in section Data Type Reference, Operators and Functions of MySQL |
|
Answer» CORRECT CHOICE is (C) TIMESTAMP The best explanation: The date and time types for representing temporal values are ‘DATE’, ‘TIME’, ‘DATETIME’, ‘TIMESTAMP’ and ‘YEAR’. Each temporal type has a range of valid values and a ‘zero’ value. |
|
| 33. |
Which is the header that should be included first?(a) my_global.h(b) my_sys.h(c) mysql.h(d) my_local.hThe question was posed to me during an online exam.This key question is from String Data Types topic in portion Data Type Reference, Operators and Functions of MySQL |
|
Answer» The correct answer is (a) my_global.h |
|
| 34. |
Which is the library file that contains various portability macros and definitions?(a) my_global.h(b) my_sys.h(c) mysql.h(d) my_local.hI have been asked this question in an internship interview.My query is from String Data Types in division Data Type Reference, Operators and Functions of MySQL |
|
Answer» The correct answer is (B) my_sys.h |
|
| 35. |
What is SBR replication?(a) Statement based(b) Row based(c) Column based(d) Table basedI have been asked this question by my school principal while I was bunking the class.My question is taken from String Data Types topic in division Data Type Reference, Operators and Functions of MySQL |
|
Answer» RIGHT answer is (a) Statement based To elaborate: There are two MAIN KINDS of replication format: Statement Based Replication (SBR) replicates entire SQL statements and ROW Based Replication (RBR) replicates only the changed rows. |
|
| 36. |
Replication does not enable data from one MySQL database server to be copied to one or more MySQL database servers.(a) True(b) FalseI got this question in an online interview.This is a very interesting question from String Data Types in chapter Data Type Reference, Operators and Functions of MySQL |
|
Answer» CORRECT CHOICE is (B) False Best explanation: REPLICATION enables data from ONE MySQL database server (the master) to be copied to one or more MySQL database servers (the slaves). Replication is asynchronous by default. |
|
| 37. |
What is used to reload a delimited text data file?(a) mysqldump(b) mysqld(c) mysqlimport(d) mysqlnaiveI have been asked this question in class test.Asked question is from String Data Types in section Data Type Reference, Operators and Functions of MySQL |
|
Answer» Correct option is (c) mysqlimport |
|
| 38. |
For InnoDB tables in mysqldump an online backup that takes no locks on tables can be performed by which option?(a) –multiple-transaction(b) –single-transaction(c) –double-transaction(d) –no-transactionThis question was addressed to me in an interview for internship.My question is from String Data Types topic in division Data Type Reference, Operators and Functions of MySQL |
|
Answer» The correct answer is (b) –single-transaction |
|
| 39. |
What is the minimum value stored by signed TINYINT?(a) -256(b) -128(c) 0(d) 128The question was posed to me in an interview for job.I want to ask this question from String Data Types in section Data Type Reference, Operators and Functions of MySQL |
|
Answer» Right option is (b) -128 |
|
| 40. |
Which mode does not remove trailing spaces when CHAR values are retrieved?(a) PAD_CHAR_TO_FULL_LENGTH(b) TO_FULL_LENGTH_CHAR_PAD(c) CHAR_PAD_TO_FULL_LENGTH(d) PAD_CHAR_TO_LENGTHI got this question during an interview for a job.This intriguing question comes from String Data Types topic in portion Data Type Reference, Operators and Functions of MySQL |
|
Answer» Right choice is (a) PAD_CHAR_TO_FULL_LENGTH |
|
| 41. |
The storage in bytes required for VARCHAR(4) type ‘abcd’ is _____________(a) 1(b) 3(c) 5(d) 8The question was posed to me in exam.This interesting question is from String Data Types in section Data Type Reference, Operators and Functions of MySQL |
|
Answer» Correct option is (c) 5 |
|
| 42. |
The maximum value that can be specified to the size of VARCHAR is _____________(a) 0(b) 127(c) 1023(d) 65535This question was posed to me during an interview.Enquiry is from String Data Types topic in chapter Data Type Reference, Operators and Functions of MySQL |
|
Answer» CORRECT OPTION is (d) 65535 Explanation: The values in ‘VARCHAR’ columns are variable length strings. The length can be a value from 0 to 65,535. The effective MAXIMUM length of a VARCHAR is subject to the maximum row size. |
|
| 43. |
The operator used in PHP to access property of an object is ________________(a) .(b) *(c) ->(d) @This question was addressed to me during a job interview.I want to ask this question from Numeric Data Types topic in chapter Data Type Reference, Operators and Functions of MySQL |
|
Answer» CORRECT choice is (c) -> Explanation: If $a REPRESENTS an object, the properties it has can be accessed as $a->property-name. For INSTANCE, $a->white, $a->BLACK, $a->blue, $a->red can be the properties of $a and accessed in this way. |
|
| 44. |
If $a represents an array with numeric indices in PHP, the first element accessed by ______________(a) $a[1](b) $a[0](c) $a.1(d) $a.0This question was addressed to me in a job interview.My query is from Numeric Data Types in portion Data Type Reference, Operators and Functions of MySQL |
|
Answer» The correct OPTION is (b) $a[0] |
|
| 45. |
A password applies locally to an account.(a) True(b) FalseI have been asked this question during an online exam.This is a very interesting question from Numeric Data Types topic in portion Data Type Reference, Operators and Functions of MySQL |
|
Answer» CORRECT option is (B) False Easy explanation: In the MySQL privilege SYSTEM, a password applies GLOBALLY to an account. A password cannot be explicitly associated with a specific object such as a database, table, or routine. |
|
| 46. |
On Unix, ‘mysql’ client writes a record of executed statements to a history file.(a) True(b) FalseI had been asked this question in a national level competition.Query is from Numeric Data Types topic in chapter Data Type Reference, Operators and Functions of MySQL |
|
Answer» Correct choice is (a) True |
|
| 47. |
MySQL uses security based on ACL. What does it stand for?(a) Access Control Language(b) Access Control Lists(c) Automatic Control Lists(d) Automatic Control LanguageThis question was posed to me in my homework.The origin of the question is Numeric Data Types in portion Data Type Reference, Operators and Functions of MySQL |
|
Answer» Correct option is (b) ACCESS Control Lists |
|
| 48. |
The minimum value stored by signed TINYINT is _____________(a) -256(b) -128(c) 0(d) 128I had been asked this question in an internship interview.I would like to ask this question from Numeric Data Types topic in division Data Type Reference, Operators and Functions of MySQL |
|
Answer» Correct OPTION is (b) -128 |
|
| 49. |
The statement that suspends the replication related activity of the slave server is _____________(a) RESUME SLAVE(b) START SLAVE(c) STOP SLAVE(d) GET SLAVEThis question was addressed to me in a job interview.I want to ask this question from Numeric Data Types in division Data Type Reference, Operators and Functions of MySQL |
|
Answer» Correct answer is (C) STOP SLAVE |
|
| 50. |
Which of these is not an exact numeric type?(a) SMALLINT(b) DECIMAL(c) NUMERIC(d) REALThe question was asked in homework.This intriguing question originated from Numeric Data Types in chapter Data Type Reference, Operators and Functions of MySQL |
|
Answer» The correct choice is (d) REAL |
|