This set of MySQL Database Multiple Choice Questions & Answers (MCQs) focuses on “Perl Script Characteristics”.
1. Perl scripts are text files.
a) True
b) False
View Answer
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.
2. The shebang line is ______________
a) #!
b) !#
c) #$
d) $#
View Answer
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.
3. The Perl DBI is ______________
a) database inheritance
b) database integrity
c) database interface
d) database isolation
View Answer
Explanation: The Perl DBI is the Perl Database Interface. The work of the interface is to form a link between the application programming interface in C with all the other programming languages.
4. The default path to perl in Unix is ______________
a) /usr/bin/perl
b) /usr/bin
c) /usr/perl
d) /usr/perl/bin
View Answer
Explanation: All Perl scripts generally begin with a #! (shebang) line. A script is a file containing a sequence of commands. The Perl scripts are text files, which can be ceated using any text editor.
5. Which of these is not optional?
SELECT select_list FROM table_list WHERE row_constraint GROUP BY grouping_columns;
a) select_list
b) table_list
c) row_constraint
d) grouping_columns
View Answer
Explanation: Given above was a basic syntax of the SELECT statement. Everything in the syntax is optional except the ‘select_list’ option. All the others are free to be omitted, and will work fine.
6. Which is the join in which all the rows from the right table appear in the output irrespective of the content of the other table?
a) CARTESIAN JOIN
b) CROSS JOIN
c) INNER JOIN
d) RIGHT JOIN
View Answer
Explanation: In a ‘RIGHT JOIN’, the output is produced for every row of the right table, even if it does not exist in the other table. This is the reason why it is called a ‘RIGHT JOIN’. ‘RIGHT JOIN’ and ‘LEFT JOIN’ are a kind of OUTER JOIN.
7. What is the facility that allows nesting one select statement into another?
a) nesting
b) binding
c) subquerying
d) encapsulating
View Answer
Explanation: The ‘subquerying’ support provided by MySQL is a capability that allows writing one ‘SELECT’ statement within parentheses and nesting within another. This allows logically selecting content from tables.
8. Which of these operators does not perform relative value comparisons?
a) =
b) ==
c) <=
d) >=
View Answer
Explanation: The operators =, <>, >, >=, <, and >= perform relative value comparisons in MySQL. ‘==’ is not a valid comparison operator in MySQL. Such operators are useful in filtering information from a table.
9. To combine multiple retrievals, which keyword is used to write several SELECT statements between them?
a) COMBINE
b) CONCAT
c) JOIN
d) UNION
View Answer
Explanation: The ‘UNION’ operator is used for combining the results of various ‘SELECT’ queries into one. For example, ‘SELECT a FROM table1 UNION SELECT a FROM table2;’ produces the results from tables table1 concatenated with that of table2.
10. Issuing ‘SELECT’ on a MERGE table is like _____________
a) UNION
b) UNION ALL
c) UNION DISTINCT
d) JOIN
View Answer
Explanation: Performing a ‘SELECT’ operation on a ‘MERGE’ table is like performing ‘UNION ALL’. This means that duplicate row results are not removed. ‘SELECT DISTINCT’ is like ‘UNION’ or ‘UNION DISTINCT’.
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
- Check Information Technology Books
- Apply for Programming Internship
- Practice Programming MCQs