Home
MCQS
SQL MCQ Quiz Hub
SQL MCQ SET 12
Choose a topic to test your knowledge and improve your SQL skills
1. What will be the output of the following MySQL statement “Null OR Null”?
TRUE
Null
FALSE
None of the mentioned
2. What will be the output of the following MySQL statement “NOT (Null)”?
TRUE
Null
FALSE
None of the mentioned
3. What is the meaning of the “WHERE” clause in Mysql?
Filtering out unwanted rows from result set
Filtering out unwanted columns from result set
Filtering out unwanted rows and columns from result set
None of the mentioned
4. What is the meaning of “GROUP BY” clause in Mysql?
Group data by column values
Group data by row values
Group data by column and row values
None of the mentioned
5. Which clause is similar to “HAVING” clause in Mysql?
SELECT
WHERE
FROM
None of the mentioned
6. What is the meaning of “HAVING” clause in Mysql?
To filter out the row values
To filter out the column values
To filter out the row and column values
None of the mentioned
7. “COUNT” keyword belongs to which categories in Mysql?
Aggregate functions
Operators
Clauses
All of the mentioned
8. Which among the following belongs to an “aggregate function”?
COUNT
UPPER
LOWER
All of the mentioned
9. Which of the following belongs to an “aggregate function”?
COUNT
SUM/AVG
MIN/MAX
All of the mentioned
10. Which clause is used with an “aggregate functions”?
GROUP BY
SELECT
WHERE
Both GROUP BY and WHERE
11. Is “GROUP BY” clause is similar to “ORDER BY” clause?
Yes
No
Depends
None of the mentioned
12. What is the meaning of “ORDER BY” clause in Mysql?
Sorting your result set using column data
Aggregation of fields
Sorting your result set using row data
None of the mentioned
13. Which keyword is used for sorting the data in descending order in Mysql?
DESC
ASC
ALTER
MODIFY
14. Which keyword is used for sorting the data in ascending order in Mysql?
DESC
ASC
ALTER
MODIFY
15. Keyword “ASC” and “DESC” cannot be used without which clause in Mysql?
ORDER BY
GROUP BY
SELECT
HAVING
16. Which of the following operators is/are used in “Condition Evaluation”?
AND
OR
NOT
All of the mentioned
17. Which of the following statements is/are correct?
True AND true =true
True AND false= false
False AND false= false
All of the mentioned
18. Which of the following statements is/are correct?
True OR true =true
True OR false= true
False OR false= false
All of the mentioned
19. Which of the following statements is/are correct?
NOT(true)=false
NOT(false)=true
Both NOT(true)=false and NOT(false)=true
None of the mentioned
20. Which of the following statements is/are correct?
NOT(true AND true) =false
NOT(false AND false)=true
NOT (true AND false)= true
All of the mentioned
21. Which of the following statements is/are correct?
NOT(true OR true) = false
NOT(false OR false)= true
NOT (true OR false)= false
All of the mentioned
22. Select odd one out?
Equality Conditions
Inequality Conditions
Range condition
Between
23. What is the meaning of “Equality Conditions”?
Equal to
Not equal to
Both Equal to and Not equal to
None of the mentioned
24. What is the meaning of “Inequality Condition”?
Not equal to
Equal to
Both Not equal to and Equal to
None of the mentioned
25. What is the meaning of “Range Conditions”?
Expression is equal to Expression
Expression is not equal to Expression
Expression fall under certain range
None of the mentioned
26. Which among the following data types can be used with “Range Condition”?
Numeric data type
Temporal data type
String data type
Both Numeric and Temporal data type
27. Which among the following operators is/are belongs to “Inequality conditions”?
<>
!=
=
Both <> and !=
28. Which among the following operators is/are belongs to “Equality conditions”?
<>
!=
=
>/<
29. Which among the following operators is/are belongs to “Range conditions”?
<>
!=
=
>/<
30. What is the meaning of “NULL” in Mysql?
Not applicable
Value not yet known
Value undefined
All of the mentioned
31. Which operator is used to check whether the expression is “NULL”?
IS NULL
NOT NULL
ON
None of the mentioned
32. Which operator is used to check the expression is not “NULL”?
IS NULL
NOT NULL
ON
None of the mentioned
33. The program that copies the databases from one server to another is ____________
mysqldbcopy
mysqlcopydb
mysqlflushdb
mysqldbflush
34. Which privileges are required on the source server to use mysqldbcopy?
CREATE
INSERT
UPDATE
SELECT
35. Which option is used in mysqldump to make all tables in the destination databases to use a different storage engine?
–next-storage-engine
–new-storage-engine
–clear-storage-engine
–get-storage-engine
36. The function that returns reference to hash of row values is ____________
fetchrow_array()
fetchrow_arrayref()
fetch()
fetchrow_hashref()
37. The best datatype for a column that is expected to store values up to 2 million is _________
SMALLINT
TINYINT
MEDIUMINT
BIGINT
38. Which type stores the longest length of strings?
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 __________
bad
good
fare
illegal
40. The number of files that each end of a client/server connection including SSL support use to set up secure communications is __________
0
1
2
3
41. What is the TLS protocol?
transparent layer security
transport layer security
transparent level security
transport level security
42. Which grant table scope columns are case insensitive?
Host
User
Password
Db
43. The function that returns a reference to an array of row values is ______________
fetchrow_array()
fetchrow_arrayref()
fetch()
fetchrow_hashref()
44. The log in which data changes received from a replication master server are written is _____
error log
general query log
binary log
relay log
45. Which SQL function is used to count the number of rows in a SQL query?
COUNT()
NUMBER()
SUM()
COUNT(*)
46. Which SQL keyword is used to retrieve a maximum value?
MOST
TOP
MAX
UPPER
47. Which of the following SQL clauses is used to DELETE tuples from a database table?
DELETE
REMOVE
DROP
CLEAR
48. _____removes all rows from a table without logging the individual row deletions.
DELETE
REMOVE
DROP
TRUNCATE
49. Which of the following is not a DDL command?
UPDATE
TRUNCATE
ALTER
None of the Mentioned
50. Which of the following are TCL commands?
UPDATE and TRUNCATE
SELECT and INSERT
GRANT and REVOKE
ROLLBACK and SAVEPOINT
Submit