Home
MCQS
SQL MCQ Quiz Hub
SQL MCQ SET 10
Choose a topic to test your knowledge and improve your SQL skills
1. The storage in bytes required for VARCHAR(4) type ‘abcd’ is _____
1
3
5
6
2. Which mode does not remove trailing spaces when CHAR values are retrieved?
PAD_CHAR_TO_FULL_LENGTH
TO_FULL_LENGTH_CHAR_PAD
CHAR_PAD_TO_FULL_LENGTH
PAD_CHAR_TO_LENGTH
3. What is the minimum value stored by signed TINYINT?
-256
-128
0
128
4. For InnoDB tables in mysqldump an online backup that takes no locks on tables can be performed by which option?
–multiple-transaction
–single-transaction
–double-transaction
–no-transaction
5. What is used to reload a delimited text data file?
mysqldump
mysqld
mysqlimport
mysqlnaive
6. What is SBR replication?
Statement based
Row based
Column based
Table based
7. Which is the library file that contains various portability macros and definitions?
my_global.h
my_sys.h
mysql.h
my_local.h
8. Which is the header that should be included first?
my_global.h
my_sys.h
mysql.h
my_local.h
9. Which of these has special automatic update behavior?
DATE
TIME
TIMESTAMP
YEAR
10. To disallow zero month or day parts in dates, the option used is _______
NO_ZERO_IN_DATE
NO_DATE_WITH_ZERO
ZERO_IN_DATE
DATE_WITH_ZERO
11. The mode that does not remove trailing spaces when CHAR values are retrieved is ________
PAD_CHAR_TO_FULL_LENGTH
TO_FULL_LENGTH_CHAR_PAD
CHAR_PAD_TO_FULL_LENGTH
PAD_CHAR_TO_LENGTH
12. The functions in Perl DBI called?
functions
procedures
methods
programs
13. The variable used as a handle to an open file is _______
$dbh
$sth
$fh
$h
14. Which variable is a handle to a database object?
$dbh
$sth
$fh
$h
15. Which classes does spatial data types in MySQL correspond to?
OpenGSS
OpenGIS
ClosedGSS
ClosedGIS
16. Which type can store a collection of objects of any type?
GEOMETRYCOLLECTION
MULTIPOINT
MULTILINESTRING
MULTIPOLYGON
17. What is the generic handle whose meaning depends on context?
$dbh
$sth
$fh
$h
18. What is the non handle array representing a row of values?
$rc
$rv
$rows
$ary
19. The mode of search is the search string parsed into words and the search looks for rows is _________
Boolean mode
Natural language
Query expansion
Cross mode
20. In which mode is the indicator of the presence/absence of a word in search used?
Natural language
Boolean mode
Query expansion
Cross mode
21. Which operator is used to return value from JSON columns after evaluating the path and unquoting the result?
->
->>
<<
>>
22. Which operator compares sounds?
MATCH SOUNDS
CHECK SOUNDS
SOUNDS LIKE
SOUNDS SIMILAR
23. What does RTF refer to?
Rich Text Format
Right Text Format
Rich Text Function
Right Text Function
24. Which function returns an array of row values?
fetchrow_array()
fetchrow_arrayref()
fetch()
fetchrow_hashref()
25. Which function returns a reference to hash of row values?
fetchrow_array()
fetchrow_arrayref()
fetch()
fetchrow_hashref()
26. ‘fetchrow_hashref()’ returns a reference to the hash of row values keyed by what?
row name
column name
table name
database name
27. The server is told to accept spaces after function names by _______
–sql-mode=SKIP_SPACE
–sql-mode=IGNORE_SPACE
–sql-mode=SPACE_IGNORE
–sql-mode=SPACE_SKIP
28. Which function returns NULL if expr1 = expr2?
CASE
IF()
IFNULL()
NULLIF()
29. The operator that compares sounds is ________
MATCH SOUNDS
CHECK SOUNDS
SOUNDS LIKE
SOUNDS SIMILAR
30. The string function that returns the index of the first occurrence of substring is ______
INSERT()
INSTR()
INSTRING()
INFSTR()
31. What does the AUTO_INCREMENT sequences begin at by default?
0
1
-1
2
32. The join in which all the rows from the right table appear in the output irrespective of the content of the other table is _________
CARTESIAN JOIN
CROSS JOIN
INNER JOIN
RIGHT JOIN
33. The facility that allows nesting one select statement into another is ________
nesting
binding
subquerying
encapsulating
34. Which system variable when set to 1, makes all temporary tables to get stored on disk rather than in memory?
basedir
back_log
big_tables
bind_address
35. The permitted value type for the variable ‘character_set_client’ is ________
integer
float
double
string
36. Which string function returns the index of the first occurrence of substring?
INSERT()
INSTR()
INSTRING()
INFSTR()
37. Which module links DBI to the web?
CGI.pn
CGI.pem
CGI.pm
CGI.po
38. What does CGI stand for?
Computer Gateway Interface
Common Gateway Interface
Computer Generated Interface
Common Generated Interface
39. The line that 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
40. What is the shebang line?
#!
!#
#$
$#
41. Which of these is a read only variable?
error_count
big_tables
autocommit
foreign_key_checks
42. Which variable when set to 1 would enable foreign key checking for InnoDB tables?
error_count
identity
foreign_key_checks
autocommit
43. The synonym for last_insert_id session variable is ______
insert_id
identity
sql_auto_is_null
sql_big_selects
44. When building from source, the embedded server library is enabled by what?
–with-embedded-server
with-server-embedded
–with-embedded-library
–with-library-embedded
45. What returns a string containing an error message?
mysql_error()
mysql_errno()
mysql_sqlstate()
mysql_close()
46. The statement that views status variables by aggregating the values over all connections is _________
SHOW SESSION STATUS
SHOW LOCAL STATUS
SHOW GLOBAL STATUS
SHOW STATUS
47. Which keyword inserted in the SHOW STATUS statement shows the values for the current connection?
GLOBAL
SESSION
LOCAL
DEFAULT
48. What is the synonym for last_insert_id session variable?
insert_id
identity
sql_auto_is_null
sql_big_selects
49. The Audit_log_events system variable is of type ________
string
integer
float
double
50. The option that executes all SQL statements in a SQL script irrespective of the number of errors is ______
–ensure
–force
–violent
–run
Submit