R4RIN
Articles
Java 8
MCQS
SQL MCQ Quiz Hub
SQL MCQ SET 5
Choose a topic to test your knowledge and improve your SQL skills
1. The argument to the function mysql_error() is ________
integer
float
structure
pointer
2. What does mysql_real_connect() return if it fails?
integer
float
structure
NULL
3. The –protocol value ‘TCP’ runs on which operating systems?
unix only
windows only
all
none
4. The general statement-issuing routine is _______
mysql_real_query()
mysql_query_real()
mysql_image_query()
mysql_query_image()
5. For failure, mysql_query() returns ______
0
1
-1
a non-zero
6. mysql_fetch_row() returns ______
integer
float
structure
pointer
7. What enables encrypted connections to be established?
exec_stmt_ssl
exec_ssl_stmt
exec_stmnt_ssl
exec_ssl_stmnt
8. The exec_stmt_ssl is written in ______
C++
C
Python
Perl
9. On failure, ‘mysql_query()’ returns ______
0
1
-1
a non-zero value
10. Which mode prevents MySQL to perform full checking of date parts?
PREVENT_DATE_CHECK
STOP_DATES_CHECK
ALLOW_DATES_INVALID
ALLOW_INVALID_DATES
11. Which statement is used to determine the storage engine for individual tables?
SHOW TABLE STATUS
SHOW DEFAULT STATUS
SHOW STATUS OF TABLE
SHOW STATUS TABLE
12. Which table in the ‘INFORMATION_SCHEMA’ stores information about storage engines and server plugins?
ENGINES, PLUGINS
FILES, PLUGINS
PLUGINS, STATISTICS
ENGINES, FILES
13. The embedded server library containing the MySQL server linkable into applications is ______
libmysqla
libmysqlb
libmysqlc
libmysqld
14. When building from source, the embedded server library is enabled by _____
with-embedded-server
with-server-embedded
with-embedded-library
with-library-embedded
15. Which clause is used to display information that matches a given pattern?
WHERE
IS
SAME
LIKE
16. Comparing a known value with NULL results into _______
null
zero
a positive value
a negative value
17. Which is the command to move the cursor to the beginning of line in mysql input editor?
Ctrl-E
Ctrl-D
Esc-a
Ctrl-A
18. The name of the option file in Unix is ______
.my.cnf
.my.ini
my.opt
my.opc
19. System variable in MySQL server that enables to configure the SQL mode is ____
sql_mode
sql_config
sql_server
sql_enable
20. Which option enables multiple-statement execution?
CLIENT_MULTI_STATEMENTS
CLIENT_STATEMENTS_MULTI
MULTI_STATEMENTS_CLIENT
MULTI_CLIENTS_STATEMENTS
21. Which option executes all SQL statements in a SQL script irrespective of the number of errors?
ensure
force
violent
run
22. To see the table structure which command is issued?
VIEW tbl_name;
SELECT TABLE tbl_name;
SELECT tbl_name;
DESCRIBE tbl_name;
23. Which character is illegal in naming an unquoted identifier in SQL?
.
_
$
2
24. Which statement is valid if ‘`sampledb`’ is a database and ‘`tbl`’ is a table in it?
SELECT * FROM `sampledb.member`
SELECT * FROM `sampledb`.`member`
SELECT * FROM `member`.`sampledb`
SELECT * FROM `member.sampledb`
25. The default case sensitivity of the database and table names depends on ___________
Server SQL mode
Operating system of machine
Does not depend on anything
SQL server
26. The maximum collations a character set can have is ______________
0
1
2
more than 1
27. A synonym for CHARACTER SET is ______
CSET
CHSET
CHARSET
CHCSET
28. The statement used to select a default database is ______
USE
CREATE
DROP
SCHEMA
29. The statement that makes changes to the global attributes of the database is ______
CHANGE
ALTER
ALTERNATE
UPDATE
30. The statement used to remove indexes on tables is _____
DROP INDEX
DELETE INDEX
REMOVE INDEX
FLUSH INDEX
31. The statement used to change the table name is ____
RENAME
CHANGE
CHANGENAME
CHANGENM
32. What is the general term for information about databases and the objects in MySQL?
datum
info
record
metadata
33. The shebang line is ______
#!
!#
#$
$#
34. The Perl DBI is _______
database inheritance
database integrity
database interface
database isolation
35. The default path to perl in Unix is ______
/usr/bin/perl
/usr/bin
/usr/perl
/usr/perl/bin
36. 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?
CARTESIAN JOIN
CROSS JOIN
INNER JOIN
RIGHT JOIN
37. What is the facility that allows nesting one select statement into another?
nesting
binding
subquerying
encapsulating
38. Which of these operators does not perform relative value comparisons?
=
==
<=
>=
39. To combine multiple retrievals, which keyword is used to write several SELECT statements between them?
COMBINE
CONCAT
JOIN
UNION
40. Issuing ‘SELECT’ on a MERGE table is like ______
UNION
UNION ALL
UNION DISTINCT
JOIN
41. In Perl DBI, functions are called ______
functions
procedures
methods
programs
42. Which variable is used as a handle to an open file?
$dbh
$sth
$fh
$h
43. The variable that is a handle to a database object is ______
$dbh
$sth
$fh
$h
44. Which variable returns code from operations that return true or false?
$rc
$rv
$rows
$ary
45. The statement to remove indexes on tables is _______
DROP INDEX
DELETE INDEX
REMOVE INDEX
FLUSH INDEX
46. What allows nesting one select statement into another?
nesting
binding
subquerying
encapsulating
47. The operator that does not perform relative-value comparisons is ________
=
==
<=
>=
48. The key declares that an index in one table is related to that in another is called ______
primary
secondary
foreign
cross
49. The generic handle whose meaning depends on context is _____
$dbh
$sth
$fh
$h
50. The non handle array representing a row of values is ________
$rc
$rv
$rows
$ary
Submit