This set of MySQL Database Multiple Choice Questions & Answers (MCQs) focuses on “Comment Syntax”.
1. Which of these is not a comment specifying construct?
a) #
b) /* */
c) —
d) !#
View Answer
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.
2. The MySQL double dashed comment style is the same as the SQL standard.
a) True
b) False
View Answer
Explanation: The MySQL double-dash (–) comment style is different from the comment style of standard SQL, which begins with just two dashes. It does not require the space before any following text.
3. What sets the association between one or more MyISAM tables and the named key cache?
a) BEGIN
b) CACHE INDEX
c) ALTER DATABASE
d) ALTER EVENT
View Answer
Explanation: ‘CACHE INDEX’ sets up an association between one or more MyISAM tables and the named key cache which must already exist. The INDEX privilege is needed for each table named in the statement.
4. The statement that exits a labeled flow-control construct is _____________
a) DESCRIBE
b) LEAVE
c) LOOP
d) RETURN
View Answer
Explanation: The ‘LEAVE’ statement is used to exit a labeled flow-control construct. This statement must appear within the construct that has the given label. The syntax of the statement is ‘LEAVE label’.
5. Input handling can be customized with MySQL.
a) True
b) False
View Answer
Explanation: With mysql, raw SQL statements can be entered. With MySQL programs input methods can be provided for the user that is more intuitive and easier to be used. So input handling is customized.
6. The option that executes all SQL statements in a SQL script irrespective of the number of errors is _____________
a) –force
b) –run
c) –ensure
d) –violent
View Answer
Explanation: If SQL queries in a file are run using mysql in batch mode, mysql either quits after the first error. If the –force option is specified all the queries are executed indiscriminately.
7. The option that is necessary to compile a C program having math functions is _____________
a) -lm
b) -ln
c) -lp
d) -lq
View Answer
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().
8. Which option is used for specifying the executable name while compiling with gcc?
a) -e
b) -o
c) -a
d) -b
View Answer
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’.
9. The file that can be used to execute multiple compile statements is _________________
a) makefile
b) dofile
c) putfile
d) pushfile
View Answer
Explanation: The Makefile is used to write multiple commands in there. The file is executed by prefixing the command ‘make’ with the command to run the file script containing the statements.
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.
- Check MySQL Books
- Practice Programming MCQs
- Check Information Technology Books
- Apply for Programming Internship