R4RIN
Articles
Java 8
MCQS
SQL MCQ Quiz Hub
SQL MCQ SET 8
Choose a topic to test your knowledge and improve your SQL skills
1. The log enabled by –relay-log-index is _____
relay log index
relay log
binary log
error log
2. What is the storage size in bytes required for the MEDIUMINT datatype?
1
2
3
4
3. What is the size of the BIT type?
1
2
3
variable
4. What is the synonym for REAL?
FLOAT
INT
DOUBLE
BIT
5. Execution on a time activated basis according to a schedule is done by _______
Stored program
Events
Triggers
Stored procedures
6. The character that the MySQL client program recognizes as a statement delimiter is _______
:
.
;
,
7. Which upgrade involves exporting existing data using mysqldump?
inplace
logical
illogical
system
8. Which upgrade involves shutting down the old MySQL version and replacing the old binaries?
inplace
logical
illogical
system
9. Slow shutdown can be performed by setting innodb_fast_shutdown to ________
0
-1
1
2
10. The command to see the warning messages is _______
DISPLAY WARNINGS
DISP WARNINGS
DISP WARNING
SHOW WARNINGS
11. What is the SQL mode to check for divide by zero error?
STRICT_ALL_TABLES
ERROR_FOR_DIVISION_BY_ZERO
ERROR_DIVIDE_BY_ZERO
ERROR_WHEN_DIVIDE_BY_ZERO
12. The mode used to turn on strict mode and all of the additional restrictions is ____
STRICT_ALL_TABLES
ERROR_FOR_DIVISION_BY_ZERO
TRADITIONAL
ERROR_WHEN_DIVIDE_BY_ZERO
13. The number of values returned from a stored procedure can be _____
0
1
2
3
14. How would a stored function named PI() written in the database ‘sampdb’ be called?
PI()
sampdb.PI()
MySQL.PI()
db.PI()
15. The privilege that must be given to the database to create a stored function or procedure is _____
CREATE ROUTINE
CREATE METHOD
CREATE FUNCTION
CREATE PROCEDURE
16. To check if the data directory contains insecure files or directories, the command executed is _____________
ls -l
ls -a
ls -la
ls -lu
17. What enables the read and execute access to all users outside of mysql group.
drwxrwxr-x
drwxrwxr-y
drwyrwyr-x
drwyrwyr-y
18. Which program is used as a utility for MyISAM table maintenance?
innochecksum
myisam_ftdump
myisamchk
myisamlog
19. What does the AUTO_INCREMENT sequences normally begin at?
0
1
-1
2
20. How can the value of recently generated sequence number be obtained?
LAST_INSERT_ID()
LATEST_INSERT_ID()
INITIAL_INSERT_ID()
INSERT_ID()
21. What does LAST_INSERT_ID() return when no AUTO_INCREMENT value has been generated during the current connection?
-1
0
1
2
22. Triggers are not supported for ______
delete
update
insert
views
23. How is a stored procedure invoked?
INVOKE
SEE
CALL
RETURN
24. Which table lists the accounts and the databases for which the privileges are provided?
user
db
tables_priv
procs_priv
25. The table that lists the column level privileges is ______
columns_priv
db
tables_priv
procs_priv
26. Which of these grant table scope columns is case insensitive?
Host
User
Password
Db
27. What causes a replication master server to delete all the binary log files even if they are still in use?
RESET MASTER LOGS
FLUSH TABLES
RELOAD
FLUSH LOGS
28. What does ‘abc’ || ‘xyz’, when PIPES_AS_CONCAT is enabled, result in?
0
1
abcxyz
xyzabc
29. What does the expression ‘2 BETWEEN 2 AND 5’ result in?
TRUE
FALSE
-1
2
30. The line that is not used to turn on the event scheduler is ______
event_scheduler = ON
eventscheduler = ON
event_scheduler_ON
events_scheduler_ON
31. The statement that is used to check the status of the event scheduler at runtime is _____
SHOW STATUS OF ‘event_scheduler’
SHOW VARIABLES OF ‘event_scheduler’
SSHOW STATUS LIKE ‘event_scheduler’
SHOW VARIABLES LIKE ‘event_scheduler’
32. The value of event_scheduler that enables checking status but not changing it at runtime is ______________
ON
OFF
DISABLED
ENABLED
33. How many files does each end of a client/server connection including SSL support use to set up secure communications?
0
1
2
3
34. The TLS protocol is _____
transparent layer security
transport layer security
transparent level security
transport level security
35. The grant table scope columns that is case insensitive is _____
Host
User
Password
Db
36. Which variable checks for the availability of SSL support?
ave_ssl
has_ssl
avail_ssl
ssl_avail
37. What is the best datatype for a column that is expected to store values up to 2 million?
SMALLINT
TINYINT
MEDIUMINT
BIGINT
38. The datatype that stores the longest length of strings is _____
CHAR
VARCHAR
TINYTEXT
TEXT
39. The security context when a user creates a stored program that accesses sensitive data but forgets that other people who can invoke the object have the same access is ______
good
bad
illegal
fare
40. The recovery of data changes made since a given point in time is called ____
decremental
incremental
close
clear
41. What performs a key distribution analysis and stores the distribution for the named table or tables?
ANALYZE TABLE
CHECK TABLE
CHECKSUM TABLE
OPTIMIZE TABLE
42. Which of the following columns is not returned by ‘OPTIMIZE TABLE’?
Table
Op
Msg_type
Msg_txt
43. REPAIR TABLE does not work for _____
MyISAM
ARCHIVE
InnoDB
CSV
44. What is a synonym for CHARACTER SET?
CSET
CHSET
CHARSET
CHCSET
45. The line which is written at the top of the script to write a Perl script using CGI.pm is _______
use this CGI
put CGI
use CGI
include CGI
46. To perform consistency checks on a MyISAM table the statement is _____
CHECK TABLE
REPAIR TABLE
ANALYZE TABLE
OPTIMIZE TABLE
47. The statement that performs key distribution analysis and stores the distribution for the named tables is _______
CHECK TABLE
ANALYZE TABLE
CHECKSUM TABLE
OPTIMIZE TABLE
48. The column not returned by ‘OPTIMIZE TABLE’ is ______
Table
Msg_txt
Op
Msg_type
49. For which table does ‘REPAIR TABLE’ not work?
MyISAM
ARCHIVE
CSV
InnoDB
50. What is the Perl DBI?
database inheritance
database integrity
database interface
database isolation
Submit