InterviewSolution
Saved Bookmarks
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.
| 351. |
Which of the following is used on Solaris?(a) gcc(b) clang(c) Sun Studio(d) FreeBSD |
|
Answer» The correct choice is (c) Sun Studio The best I can explain: The program ‘gcc’ is generally used on Unix. ‘clang’ is used on ‘OSX’ or ‘FreeBSD’. The ‘Sun Studio’ is used on Solaris. However, ‘gcc’ on Unix is a widely popular choice for client programs. |
|
| 352. |
Which library file contains various portability macros and definitions?(a) my_global.h(b) my_sys.h(c) mysql.h(d) my_local.h |
|
Answer» The correct option is (b) my_sys.h Explanation: The ‘my_sys.h’ header file contains a variety of portability macros and definitions required for structures and functions. These structures and functions are used by the client library. |
|
| 353. |
Which statement is used to delete an existing row from the table?(a) DELETE(b) WHERE(c) MODIFY(d) None of the mentioned |
|
Answer» The correct option is (a) DELETE For explanation I would say: None. |
|
| 354. |
Which clause is used to rename the existing table?(a) RENAME(b) MODIFY(c) ALTER(d) None of the mentioned |
|
Answer» Right choice is (a) RENAME The explanation: None. |
|
| 355. |
“INSERT” is same as “UPDATE”?(a) NO(b) YES(c) May be(d) None of the mentioned |
|
Answer» Correct answer is (a) NO To explain: “INSERT “is used to entering the data in the newly created table while “UPDATE” is used to modify the data which is already inserted with help of statement “INSERT”. |
|
| 356. |
The JDBI interface is available for _____________(a) C(b) C++(c) Python(d) Java |
|
Answer» The correct option is (d) Java For explanation I would say: The JDBI interface is available for the programming language Java. Java is one of the most widely popular languages in the world. It is a powerful object oriented programming language. |
|
| 357. |
For which language is the PEAR module used?(a) Python(b) Perl(c) PHP(d) C |
|
Answer» The correct choice is (c) PHP For explanation I would say: The PEAR database module is specified for the language PHP. PHP is a server side scripting language and it provides an appropriate method of embedding programs in the web pages. |
|
| 358. |
The information about table index characteristics is stored in which table of INFORMATION_SCHEMA?(a) FILES(b) STATISTICS(c) SCHEMATA(d) VIEWS |
|
Answer» Correct choice is (b) STATISTICS The explanation: The ‘STATISTICS’ table in the ‘INFORMATION_SCHEMA’ stores information about the table index characteristics. ‘INFORMATION_SCHEMA’ is responsible for storing database metadata. |
|
| 359. |
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_ZERO |
|
Answer» The correct answer is (a) NO_ZERO_IN_DATE Explanation: MySQL permits to store the dates where the day or month and day are zero in a DATE or DATETIME column. This is helpful for applications that need to store birthdates for which the exact date is unknown. |
|
| 360. |
UPDATE statement is a DML statement. What does DML stand for?(a) Data Manipulation Language(b) Data Manipulation Level(c) Data Markup Language(d) Data Markup Level |
|
Answer» The correct option is (a) Data Manipulation Language The explanation is: The ‘UPDATE’ statement in MySQL is a ‘Data Manipulation Language’ statement. It performs edits on real tables present or loaded directly from the stored database. It is used in similar lines with ‘DELETE’. |
|
| 361. |
Which keyword in the UPDATE statement is used to assign values to columns?(a) ASSIGN(b) SET(c) MARK(d) GET |
|
Answer» The correct option is (b) SET To explain I would say: The ‘UPDATE’ statement in MySQL has its own syntax. The ‘SET’ keyword is followed by an assignment list which indicates the set of columns whose value needs to be updated with a specified value. |
|
| 362. |
For failure, mysql_query() returns _______________(a) 0(b) 1(c) -1(d) a non-zero |
|
Answer» Right choice is (d) a non-zero The best I can explain: Both of the functions named ‘mysql_query()’ and ‘mysql_real_query()’ return zero for statements that succeed. They return non zero for failure. A statement is successfully executed if the server accepts it. |
|
| 363. |
Which of these is the most general purpose language?(a) C(b) Perl(c) Python(d) PHP |
|
Answer» Right option is (a) C For explanation: C is a general purpose language, so in principle it can be used for anything. C tends to be used more often for standalone programs rather than for Web programming in practice. |
|
| 364. |
The option necessary to compile a C program havin math functions is ______________(a) -lm(b) -ln(c) -lp(d) -lq |
|
Answer» The correct choice is (a) -lm Explanation: To compile a program written in the C language, it is compiled by issuing the option ‘-lm’. The examples of some math functions found in ‘math.h’ are floor(), sqrt(), pow(), log(). |
|
| 365. |
The most general purpose language is ______________(a) C(b) Perl(c) Python(d) PHP |
|
Answer» Correct choice is (a) C The best I can explain: C is a general purpose language, so in principle, it can be used for anything. C tends to be used more often for standalone programs rather than for Web programming in practice. |
|
| 366. |
How many options can be used to control LOCAL capability at runtime?(a) 0(b) 1(c) 2(d) 3 |
|
Answer» The correct choice is (c) 2 To explain I would say: At runtime, the server can be started with the ‘–local-infile’ or ‘–skip-local-infile’ options to enable or disable ‘LOCAL’ capability on the server side. It can be enabled at build time too. |
|
| 367. |
How many digits is the DECIMAL used for expressions containing only exact values with fractional part?(a) 32(b) 64(c) 65(d) 16 |
|
Answer» The correct choice is (c) 65 The best I can explain: In MySQL, for the expressions containing only exact values and where one or more values have a fractional part, the DECIMAL arithmetic is used with digits of precision equal to 65. |
|
| 368. |
What is the precision of BIGINT?(a) 32(b) 64(c) 128(d) 16 |
|
Answer» The correct choice is (b) 64 Easy explanation: In MySQL, for the expressions containing only exact values that are all integers, the evaluation uses BIGINT (64 – bit) precision. MySQL evaluates expressions using exact/approximate math. |
|
| 369. |
What is the datatype for single precision floating point number?(a) FLOAT(b) DOUBLE(c) INT(d) BIGINT |
|
Answer» The correct choice is (a) FLOAT Best explanation: There are various numeric datatypes in MySQL. Some of them are TINYINT, SMALLINT, BIGINT, FLOAT, DOUBLE and BIT. ‘FLOAT’ is for single precision floating point numbers unlike DOUBLE. |
|
| 370. |
RTF refers to ______________(a) Rich Text Format(b) Right Text Format(c) Rich Text Function(d) Right Text Function |
|
Answer» The correct option is (a) Rich Text Format 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. |
|
| 371. |
The DECIMAL used for expressions containing only exact values with fractional part is of digit precision _________(a) 32(b) 64(c) 65(d) 16 |
|
Answer» The correct answer is (c) 65 For explanation I would say: In MySQL, for the expressions containing only exact values and where one or more values have a fractional part, the DECIMAL arithmetic is used with digits of precision equal to 65. |
|
| 372. |
What is x’ffff’ in decimal?(a) 65534(b) 66535(c) 65536(d) 65537 |
|
Answer» Correct answer is (c) 65536 For explanation I would say: In MySQL, string values are specified using the standard SQL notation x’val’. Here, val is pairs of hexadecimal digits (‘0’ through ‘ 9 ’ and ‘ a ’ through ‘ f ’). x’ffff’ is 65536 in decimal. |
|
| 373. |
x’ffff’ in decimal is ___________(a) 65534(b) 66535(c) 65536(d) 65537 |
|
Answer» Right choice is (c) 65536 For explanation I would say: In MySQL, string values are specified using the standard SQL notation x’val’. Here, val is pairs of hexadecimal digits (‘0’ through ‘ 9 ’ and ‘ a ’ through ‘ f ’). x’ffff’ is 65536 in decimal. |
|
| 374. |
Which Statement is used to insert the values in the table?(a) INSERT INTO(b) Insert(c) INSERT(d) None of the mentioned |
|
Answer» Correct answer is (a) INSERT INTO Explanation: None. |
|
| 375. |
Without LOCAL, LOAD DATA is _________________(a) more efficient(b) less efficient(c) same speed(d) arbitrary |
|
Answer» The correct answer is (a) more efficient Explanation: LOAD DATA is more efficient without LOCAL. Without LOCAL, the file must be located on the server. The FILE privilege must be given. The server can read the file directly from disk. |
|
| 376. |
Which mode exists at both global level and session-specific level?(a) sql_mode(b) key_buffer_size(c) server_mode(d) query_mode |
|
Answer» Correct option is (a) sql_mode The best explanation: The system variable ‘sql_mode’ that indicates the default SQL mode is an example of a variable that exists at both the global and session levels. This mode affects several aspects of SQL statement processing. |
|
| 377. |
The largest value to which the variable ‘max_allowed_packet’ can be set is ______________(a) 1GB(b) 2GB(c) 4GB(d) 8GB |
|
Answer» Correct choice is (a) 1GB The explanation: The ‘max_allowed_packet’ stores the maximum size to which the buffer used for client communications can grow. The largest value to which ‘max_allowed_packet’ variable can be set is 1GB. |
|
| 378. |
The function used to convert an int to string is ______________(a) INET_ATON()(b) INET_NTOA()(c) INET_ITOS()(d) INET_STOI() |
|
Answer» Correct choice is (b) INET_NTOA() To elaborate: In MySQL, the function used to convert an integer to a string is INET_NTOA(). On the other hand, the function INET_ATON() converts a string to the corresponding integer value. |
|
| 379. |
The function used to convert a string to an int is ______________(a) INET_ATON()(b) INET_NTOA()(c) INET_ITOS()(d) INET_STOI() |
|
Answer» The correct choice is (a) INET_ATON() The best I can explain: In MySQL, the function used to convert a string to an integer is INET_ATON(). On the other hand, the function INET_NTOA() converts a string to the corresponding integer value. |
|
| 380. |
Which of the following lines is used to turn on the event scheduler?(a) event_scheduler = ON(b) eventscheduler = ON(c) event_scheduler_ON(d) events_scheduler_ON |
|
Answer» Correct option is (a) event_scheduler = ON Explanation: The line ‘event_scheduler = ON’ is put in the option file that the server reads. The event scheduler does not run by default. It must be turned on if events are to used in the database. |
|
| 381. |
IP numbers can be represented as _________________(a) both integers and a string(b) a string but not integers(c) integers but not a string(d) neither a string nor integers |
|
Answer» Correct choice is (a) both integers and a string Best explanation: The IP addresses like 192.168.0.1 can be either stored as a string or a group of integers. Both of these forms would have their own benefits. For example, storing as a string would facilitate pattern matching. |
|
| 382. |
Without LOCAL, LOAD DATA is _________________(a) less efficient(b) more efficient(c) same speed(d) arbitrary |
|
Answer» The correct choice is (b) more efficient The explanation is: LOAD DATA is more efficient without LOCAL. Without LOCAL, the file must be located on the server. The FILE privilege must be given. The server can read the file directly from disk. |
|
| 383. |
Which of these can be used to generate hash values?(a) MS5()(b) MA5()(c) MF5()(d) MD5() |
|
Answer» The correct answer is (d) MD5() Easiest explanation: The hash values can be generated by using the function: MD5(). SHA1() or CRC32() can also be used to do the same. Custom hash values can also be created using logic within the application. |
|
| 384. |
The line that is not used to turn on the event scheduler is _________________(a) event_scheduler = ON(b) eventscheduler = ON(c) event_scheduler_ON(d) events_scheduler_ON |
|
Answer» Correct choice is (a) event_scheduler = ON Easiest explanation: The line ‘event_scheduler = ON’ is put in the option file that the server reads. The event scheduler does not run by default. It must be turned on if events are to used in the database. |
|
| 385. |
To convert an int to string, the function is _________________(a) INET_ATON()(b) INET_NTOA()(c) INET_ITOS()(d) INET_STOI() |
|
Answer» Correct answer is (b) INET_NTOA() The best I can explain: In MySQL, the function used to convert an integer to a string is INET_NTOA(). On the other hand, the function INET_ATON() converts a string to the corresponding integer value. |
|
| 386. |
To convert a string to an int, the function is _________________(a) INET_ATON()(b) INET_NTOA()(c) INET_ITOS()(d) INET_STOI() |
|
Answer» Correct choice is (a) INET_ATON() The explanation: In MySQL, the function used to convert a string to an integer is INET_ATON(). On the other hand, the function INET_NTOA() converts a string to the corresponding integer value. |
|
| 387. |
The option which finds the startup options supported by the server through mysqld is ______________(a) –verbose(b) –vertex(c) –startup(d) –shutdown |
|
Answer» The correct choice is (a) –verbose The explanation is: The statement ‘mysqld –verbose –help’ is used for finding out all the startup options that are supported by the server. It is possible to run the server manually or automatically. |
|
| 388. |
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. |
|
| 389. |
Which of the following does not support a materialized view?(a) MySQL(b) Oracle(c) PostgreSQL(d) SybaseSQL |
|
Answer» Right answer is (a) MySQL To explain: In MySQL, ‘Views’ are treated a little differently than Oracle, PostgreSQL and SybaseSQL since they support materialized views and MySQL does not use the materialized view. |
|
| 390. |
Which upgrade involves shutting down the old MySQL version and replacing the old binaries?(a) inplace(b) logical(c) illogical(d) system |
|
Answer» The correct choice is (a) inplace To explain I would say: The logical upgrade involves exporting existing data from the old MySQL version using mysqldump, installing the new MySQL version, loading the dump file into the new MySQL version. |
|
| 391. |
Which API provides the lowest level interface to the server?(a) C API(b) Perl(c) PHP(d) Python |
|
Answer» Correct answer is (a) C API The best I can explain: The C Application Programming Interface provides the lowest level interface to the server. It enforces the least policy. Therefore it provides the least amount of safety net. |
|
| 392. |
Which option is necessary to compile a C program havin math functions?(a) -lm(b) -ln(c) -lp(d) -lq |
|
Answer» Right option is (a) -lm Explanation: To compile a program written in the C language, it is compiled by issuing the option ‘-lm’. The examples of some math functions found in ‘math.h’ are floor(), sqrt(), pow(), log(). |
|
| 393. |
Which command is used to make a script file ‘run_me.sh’ executable?(a) chmod +e run_me.sh(b) chmod +a run_me.sh(c) chmod +y run_me.sh(d) chmod +x run_me.sh |
|
Answer» The correct choice is (d) chmod +x run_me.sh Explanation: The command name ‘chmod’ stands for ‘change mode’. It is used to define the way a file can be accessed. To make the script file ‘run_me.sh’ executable, the chmod command is used. |
|
| 394. |
Suppose run_me.sh is a script file. Which command is used to make it executable?(a) chmod +e run_me.sh(b) chmod +a run_me.sh(c) chmod +y run_me.sh(d) chmod +x run_me.sh |
|
Answer» The correct choice is (d) chmod +x run_me.sh For explanation: The command ‘chmod +x file_name’ makes a script file executable. mysql supports reading from a script file and executing queries from it. Before a script is run, it is necessary for it to be made executable. |
|
| 395. |
The option that is necessary to compile a C program having math functions is _____________(a) -lm(b) -ln(c) -lp(d) -lq |
|
Answer» Right choice is (a) -lm Explanation: To compile a program written in the C language, it is compiled by issuing the option ‘-lm’. The examples of some math functions found in ‘math.h’ are floor(), sqrt(), pow(), log(). |
|
| 396. |
The option for specifying the executable name while compiling with gcc is _____________(a) -e(b) -o(c) -a(d) -b |
|
Answer» Right choice is (b) -o The explanation is: When a C program is compiled with gcc, the option -o is issued in order to specify the name of the executable that is created after compilation. The default name given is ‘a.out’. |
|
| 397. |
Which option is used for specifying the executable name while compiling with gcc?(a) -e(b) -o(c) -a(d) -b |
|
Answer» Correct choice is (b) -o The explanation: When a C program is compiled with gcc, the option -o is issued in order to specify the name of the executable that is created after compilation. The default name given is ‘a.out’. |
|
| 398. |
Which of these can be used in place of MYSQL_SERVER_VERSION?(a) LIBMYSQL_VERSION(b) LIBMYSQL_VERSION_ID(c) MYSQL_VERSION_ID(d) MYSQL_ID |
|
Answer» The correct answer is (a) LIBMYSQL_VERSION Easiest explanation: The macros ‘LIBMYSQL_VERSION’ and ‘LIBMYSQL_VERSION_ID’ have the same values as ‘MYSQL_SERVER_VERSION’ and ‘MYSQL_VERSION_ID’ and the two sets of macros can be used in place of each other. |
|
| 399. |
What can be used in place of MYSQL_SERVER_VERSION?(a) LIBMYSQL_VERSION(b) LIBMYSQL_VERSION_ID(c) MYSQL_VERSION_ID(d) MYSQL_ID |
|
Answer» The correct choice is (a) LIBMYSQL_VERSION The explanation: The macros ‘LIBMYSQL_VERSION’ and ‘LIBMYSQL_VERSION_ID’ have the same values as ‘MYSQL_SERVER_VERSION’ and ‘MYSQL_VERSION_ID’ and the two sets of macros can be used in place of each other. |
|
| 400. |
Which of these is not a comment specifying construct?(a) #(b) /* */(c) —(d) !# |
|
Answer» Correct option is (d) !# Easiest explanation: The MySQL server understands three types of comments. The single line ‘#’ construct, the multiline /*…*/ construct and the — comment construct. MySQL conforms to the comment standards of SQL. |
|