R4RIN
MCQS
SQL MCQ Quiz Hub
SQL MCQ SET 11
Choose a topic to test your knowledge and improve your SQL skills
1. What does mysql_fetch_row() return?
integer
float
structure
pointer
2. Hexadecimal values assigned to user variables are treated as _______
strings
non binary strings
binary strings
integers
3. What is the type of Audit_log_events system variable?
string
integer
float
double
4. The option that enables multiple-statement execution is ______
CLIENT_MULTI_STATEMENTS
CLIENT_STATEMENTS_MULTI
MULTI_STATEMENTS_CLIENT
MULTI_CLIENTS_STATEMENTS
5. What does mysql_query() return on failure?
0
1
-1
a non-zero
6. Which statement upgrades the database directory name encoding?
ALTER DATABASE
ALTER SERVER
ALTER EVENT
ALTER FUNCTION
7. The statement that alters an existing event to have the given definition is ______
ALTER EVENT
ALTER DATABASE
ALTER FUNCTION
ALTER DATABASE
8. What sets up an association between one or more MyISAM tables and the named key cache?
BEGIN
CACHE INDEX
ALTER DATABASE
ALTER EVENT
9. Which statement can produce the same output as ‘SHOW COLUMNS’?
DESCRIBE
DISPLAY
SEE
GET
10. The option that executes all SQL statements in a SQL script irrespective of the number of errors is ______________
–run
–ensure
–force
–violent
11. The clause that is used to display information that matches a given pattern is _____________
WHERE
IS
SAME
LIKE
12. The header that should be included first is ________________
my_global.h
my_sys.h
mysql.h
my_local.h
13. What does mysql_init() return?
integer
float
structure
pointer to a structure
14. The statement that constructs a branching flow-control construct is _____________
BEGIN…END
CASE
ITERATE
LEAVE
15. Which statement terminates the execution of a function?
BEGIN…END
RETURN
ITERATE
LOOP
16. Association between one or more MyISAM tables and the named key cache is set by _____________
BEGIN
CACHE INDEX
ALTER DATABASE
ALTER EVENT
17. Which statement exits a labeled flow-control construct?
DESCRIBE
LEAVE
LOOP
RETURN
18. What is the exec_stmt_ssl written in?
C++
C
Python
Perl
19. What does ‘mysql_query()’ return on failure?
0
1
-1
a non-zero value
20. What can be used in place of MYSQL_SERVER_VERSION?
LIBMYSQL_VERSION
LIBMYSQL_VERSION_ID
MYSQL_VERSION_ID
MYSQL_ID
21. What can be used interchangeably with MYSQL_VERSION_ID?
LIBMYSQL_VERSION
LIBMYSQL_VERSION_ID
MYSQL_VERSION_ID
MYSQL_ID
22. Which of these is not a comment specifying construct?
#
/* */
—
!#
23. What sets the association between one or more MyISAM tables and the named key cache?
BEGIN
CACHE INDEX
ALTER DATABASE
ALTER EVENT
24. The statement that exits a labeled flow-control construct is _____________
DESCRIBE
LEAVE
LOOP
RETURN
25. The option that executes all SQL statements in a SQL script irrespective of the number of errors is _____________
–force
–run
–ensure
–violent
26. The option that is necessary to compile a C program having math functions is _____________
-lm
-ln
-lp
-lq
27. Which option is used for specifying the executable name while compiling with gcc?
-e
-o
-a
-b
28. The file that can be used to execute multiple compile statements is _________________
makefile
dofile
putfile
pushfile
29. What is the meaning of “SELECT” clause in Mysql?
Show me all Columns and rows
Show me all columns
Show me all rows
None of the mentioned
30. Which of the following clause is evaluated in the last by database server?
SELECT
WHERE
FROM
None of the mentioned
31. Can “SELECT” clause be used without the clause “FROM”?
YES
NO
DEPENDS
None of the mentioned
32. Which clause is mandatory with clause “SELECT” in Mysql?
FROM
WHERE
Both FROM and WHERE
None of the mentioned
33. Which among the following can also be included with “SELECT” clause while writing query in Mysql?
Literals
Expressions
User defined functions
All of the mentioned
34. What is the need of “column Aliases” in “SELECT” clause?
To assign a new label to the column in result set
To overwrite the existing column name in result set
To modify the column name while using literals, Expression, built_in functions with “SELECT clause
All of the mentioned
35. Which Keyword is used to remove duplicate rows in the result set?
DISTINCTS
MODIFY
DISTINCT
All of the mentioned
36. Which among the following is an optional Keyword?
DISTINICTS
ALL
AS
Both AS and ALL
37. How can we define the clause “FROM” in Mysql?
It defines the tables used by a query
It defines the linking of tables in Mysql
It defines the tables used by a query & linking of tables in Mysql
None of the mentioned
38. Which of the following table exist in Mysql?
Permanent Tables
Virtual tables
Temporary tables
All of the mentioned
39. “CREATE TABLE …” command is used to create which type of table in Mysql?
Permanent Tables
Virtual tables
Temporary tables
All of the mentioned
40. “CREATE VIEW …” command is used to create which type of table in Mysql?
Permanent Tables
Virtual tables
Temporary tables
All of the mentioned
41. What is the meaning of “Temporary Tables” in Mysql?
Rows returned by sub query
Permanent tables
Virtual tables
All of the mentioned
42. “SELECT” clause cannot be used without which clause in Mysql?
FROM
WHERE
ORDER BY
All of the mentioned
43. Which of the following statements is/are correct with respect to “VIEW”?
“VIEW” is a query that stored in the data dictionary
There is no data associated with “VIEW”
'VIEW” creates virtual tables in Database
All of the mentioned
44. Which command is used to create “Temporary tables” in MySQL?
CREATE TABLE;
CREATE VIEW
Both CREATE TABLE; and CREATE VIEW
None of the mentioned
45. What is the use of “VIEW” in Mysql?
To hide columns from the users
To hide the complexity of the database
To simplify complexity of database design
All of the mentioned
46. What will be the output of the following MySQL statement “true AND Null”?
TRUE
Null
Depend
None of the mentioned
47. What will be the output of the following MySQL statement “false AND Null”?
FALSE
Null
Depend
None of the mentioned
48. What will be the output of the following MySQL statement “Null AND Null”?
TRUE
Null
FALSE
None of the mentioned
49. What will be the output of the following MySQL statement “true OR Null”?
TRUE
Null
FALSE
None of the mentioned
50. What will be the output of the following MySQL statement “false OR Null”?
TRUE
Null
False
None of the mentioned
Submit