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. |
What does mysql_query() return on failure?(a) 0(b) 1(c) -1(d) a non-zeroI got this question in an internship interview.This key question is from User-Defined Variables in division System, Status and User Variables of MySQL |
|
Answer» Correct option is (d) a non-zero |
|
| 2. |
The option that enables multiple-statement execution is ____________(a) CLIENT_MULTI_STATEMENTS(b) CLIENT_STATEMENTS_MULTI(c) MULTI_STATEMENTS_CLIENT(d) MULTI_CLIENTS_STATEMENTSThe question was posed to me in a national level competition.I want to ask this question from User-Defined Variables in division System, Status and User Variables of MySQL |
|
Answer» The correct choice is (a) CLIENT_MULTI_STATEMENTS |
|
| 3. |
Multiple statement execution is disabled by default.(a) True(b) FalseI got this question during an internship interview.My question is taken from User-Defined Variables topic in chapter System, Status and User Variables of MySQL |
|
Answer» The correct CHOICE is (a) True |
|
| 4. |
What is the type of Audit_log_events system variable?(a) string(b) integer(c) float(d) doubleThe question was asked during an online interview.Question is taken from User-Defined Variables topic in chapter System, Status and User Variables of MySQL |
|
Answer» RIGHT option is (B) INTEGER To explain: The SYSTEM variable ‘Audit_log_events’ is of type integer. The variable scope if GLOBAL, that is, it can be viewed by issuing the statement ‘SHOW GLOBAL STATUS’, instead of ‘SESSION’. |
|
| 5. |
Hexadecimal values assigned to user variables are treated as _____________(a) strings(b) non binary strings(c) binary strings(d) integersThis question was posed to me in class test.I would like to ask this question from User-Defined Variables topic in section System, Status and User Variables of MySQL |
|
Answer» CORRECT choice is (c) binary strings Best explanation: The hexadcimal or bit VALUES ASSIGNED to user variables are treated as binary strings. In ORDER to assign a hexadecimal or bit value as a number to a user variable, it is used in a NUMERIC context. |
|
| 6. |
User defined variables are session specific.(a) True(b) FalseI got this question during a job interview.Question is from User-Defined Variables in portion System, Status and User Variables of MySQL |
|
Answer» Right choice is (a) True |
|
| 7. |
The columns containing a binary value that include null bytes will print properly using the %s printf() format specifier.(a) True(b) FalseI have been asked this question during an interview.My question is taken from Status Variables topic in section System, Status and User Variables of MySQL |
|
Answer» Correct option is (b) False |
|
| 8. |
What does mysql_fetch_row() return?(a) integer(b) float(c) structure(d) pointerThe question was posed to me during an interview for a job.The doubt is from Status Variables topic in division System, Status and User Variables of MySQL |
|
Answer» RIGHT answer is (d) pointer Explanation: ‘mysql_fetch_row()’ returns a MYSQL_ROW value, a pointer to an ARRAY of VALUES. If the return value is assigned to a variable named row each value WITHIN the row is accessed as row[i]. |
|
| 9. |
The option that executes all SQL statements in a SQL script irrespective of the number of errors is ____________(a) –ensure(b) –force(c) –violent(d) –runThis question was posed to me during an interview.My enquiry is from Status Variables topic in section System, Status and User Variables of MySQL |
|
Answer» The correct choice is (b) –force |
|
| 10. |
mysql_next_result() does not return a status.(a) True(b) FalseThe question was asked in an online interview.I want to ask this question from Status Variables in chapter System, Status and User Variables of MySQL |
|
Answer» Right ANSWER is (b) False |
|
| 11. |
The Audit_log_events system variable is of type _____________(a) string(b) integer(c) float(d) doubleThis question was posed to me in my homework.This interesting question is from Status Variables in section System, Status and User Variables of MySQL |
|
Answer» Right option is (B) integer |
|
| 12. |
What is the synonym for last_insert_id session variable?(a) insert_id(b) identity(c) sql_auto_is_null(d) sql_big_selectsThis question was addressed to me in unit test.The origin of the question is Status Variables in chapter System, Status and User Variables of MySQL |
|
Answer» The CORRECT option is (b) identity |
|
| 13. |
Which keyword inserted in the SHOW STATUS statement shows the values for the current connection?(a) GLOBAL(b) SESSION(c) LOCAL(d) DEFAULTI got this question by my school principal while I was bunking the class.This intriguing question originated from Status Variables in section System, Status and User Variables of MySQL |
|
Answer» The CORRECT option is (b) SESSION |
|
| 14. |
The statement that views status variables by aggregating the values over all connections is _____________(a) SHOW SESSION STATUS(b) SHOW LOCAL STATUS(c) SHOW GLOBAL STATUS(d) SHOW STATUSI have been asked this question in class test.Query is from Status Variables in chapter System, Status and User Variables of MySQL |
|
Answer» The correct CHOICE is (c) SHOW GLOBAL STATUS |
|
| 15. |
What returns a string containing an error message?(a) mysql_error()(b) mysql_errno()(c) mysql_sqlstate()(d) mysql_close()This question was posed to me in an online quiz.This intriguing question originated from Session-Only System Variables topic in portion System, Status and User Variables of MySQL |
|
Answer» Right choice is (a) mysql_error() |
|
| 16. |
When building from source, the embedded server library is enabled by what?(a) –with-embedded-server(b) –with-server-embedded(c) –with-embedded-library(d) –with-library-embeddedThis question was addressed to me during an internship interview.This intriguing question originated from Session-Only System Variables in division System, Status and User Variables of MySQL |
|
Answer» Right ANSWER is (a) –with-embedded-SERVER |
|
| 17. |
The synonym for last_insert_id session variable is _____________(a) insert_id(b) identity(c) sql_auto_is_null(d) sql_big_selectsI got this question during an online interview.Enquiry is from Session-Only System Variables in portion System, Status and User Variables of MySQL |
|
Answer» Correct CHOICE is (B) identity |
|
| 18. |
Which variable when set to 1 would enable foreign key checking for InnoDB tables?(a) error_count(b) identity(c) foreign_key_checks(d) autocommitThis question was addressed to me in an online quiz.My question is based upon Session-Only System Variables topic in portion System, Status and User Variables of MySQL |
|
Answer» CORRECT choice is (c) foreign_key_checks Best explanation: SETTING the variable ‘foreign_key_checks’ to 0 or 1 DISABLES or enables the foreign key checking for InnoDB tables. The default is to perform checking. DISABLING key checks can also be helpful. |
|
| 19. |
Which of these is a read only variable?(a) error_count(b) big_tables(c) autocommit(d) foreign_key_checksThe question was asked in an online interview.Enquiry is from Session-Only System Variables topic in chapter System, Status and User Variables of MySQL |
|
Answer» The correct choice is (a) error_count |
|
| 20. |
What is the shebang line?(a) #!(b) !#(c) #$(d) $#This question was posed to me in exam.This interesting question is from System Variables in division System, Status and User Variables of MySQL |
|
Answer» CORRECT OPTION is (a) #! The best explanation: The Perl scripts are text files, which can be ceated USING any text editor. All Perl scripts generally begin with a #! (shebang) line. A script is a file containing a SEQUENCE of commands. |
|
| 21. |
The line that is written at the top of the script to write a Perl script using CGI.pm is ___________(a) use this CGI(b) put CGI(c) use CGI(d) include CGIThis question was addressed to me by my college professor while I was bunking the class.My doubt stems from System Variables in division System, Status and User Variables of MySQL |
|
Answer» CORRECT choice is (c) use CGI The explanation: In order to WRITE a Perl script that uses the ‘CGI.pm’ MODULE, a ‘use CGI’ statement is included NEAR the BEGINNING of the script that imports the function names of the module. |
|
| 22. |
What does CGI stand for?(a) Computer Gateway Interface(b) Common Gateway Interface(c) Computer Generated Interface(d) Common Generated InterfaceI had been asked this question in my homework.This is a very interesting question from System Variables topic in chapter System, Status and User Variables of MySQL |
|
Answer» Correct CHOICE is (b) Common Gateway Interface |
|
| 23. |
Which module links DBI to the web?(a) CGI.pn(b) CGI.pem(c) CGI.pm(d) CGI.poThis question was addressed to me in a job interview.My question is from System Variables topic in portion System, Status and User Variables of MySQL |
|
Answer» Right choice is (C) CGI.pm |
|
| 24. |
Which string function returns the index of the first occurrence of substring?(a) INSERT()(b) INSTR()(c) INSTRING()(d) INFSTR()This question was addressed to me by my school principal while I was bunking the class.My doubt stems from System Variables in section System, Status and User Variables of MySQL |
|
Answer» Right choice is (b) INSTR() |
|
| 25. |
‘character_set_database’ represents the character set used by the default database.(a) True(b) FalseI got this question by my college director while I was bunking the class.The doubt is from System Variables in portion System, Status and User Variables of MySQL |
|
Answer» The correct answer is (a) True |
|
| 26. |
The permitted value type for the variable ‘character_set_client’ is _____________(a) integer(b) float(c) double(d) stringI got this question during an online interview.My enquiry is from System Variables topic in division System, Status and User Variables of MySQL |
|
Answer» The correct option is (d) string |
|
| 27. |
Which system variable when set to 1, makes all temporary tables to get stored on disk rather than in memory?(a) basedir(b) back_log(c) big_tables(d) bind_addressThis question was posed to me in an interview for internship.Question is taken from System Variables in portion System, Status and User Variables of MySQL |
|
Answer» Correct answer is (C) big_tables |
|