R4RIN
MCQS
SQL MCQ Quiz Hub
SQL MCQ SET 16
Choose a topic to test your knowledge and improve your SQL skills
1. Which keyword used with UNION retains duplicate rows?
ALL
NARROW
STRICT
DISTINCT
2. Which clause is used to sort a UNION result as a whole?
LIMIT
ORDER BY
GROUP BY
SORT
3. Suppose it is desired that UNION operation should return not more than 3 rows. Which keyword is used for this?
LIMIT
RESTRICT
COUNT
SORT
4. Which table is used to run a UNION-type query on MyISAM tables?
TRADITIONAL
MERGE
SERVELET
UNITE
5. SELECT on a MERGE table is like _____________
UNION ALL
UNION
UNION DISTINCT
JOIN
6. Which of these is also known as a virtual table?
SCHEMA
DATABASE
JOIN
VIEW
7. What is xyz in the following MySQL statement?
table
column
view
database
8. What is abc in the following MySQL statement?
row name
column name
view
database
9. A view can refer to multiple tables via __________
UNION
JOIN
GROUP
SELECT
10. A view can be deleted using the command __________
REMOVE
DELETE
CLEAR
DROP
11. What cannot be done on a view?
display
filter
index
drop
12. What can be used to check for views that have been invalidated by DROP or ALTER operations?
CREATE TABLE
VERIFY TABLE
DETAILS TABLE
CHECK TABLE
13. Which of the following does not support a materialized view?
MySQL
Oracle
PostgreSQL
SybaseSQL
14. To perform a delete on a single-table, how is the name of a column qualified?
qualification not necessary
column name
table name
database name
15. What is xyz in the following SQL statement?
column name
table name
row name
database name
16. What is abc in the following SQL statement?
column name
table name
row name
database name
17. What is x in the following MySQL statement?
column name
table name
server name
database name
18. What is the value of val2 in the following MySQL statement?
previous val1
updated val1
unchanged
val1 + 1
19. UPDATE statement is a DML statement. What does DML stand for?
Data Manipulation Language
Data Manipulation Level
Data Markup Language
Data Markup Level
20. Which keyword in the UPDATE statement is used to assign values to columns?
ASSIGN
SET
MARK
GET
21. Which keyword is used to delete all the rows from the table?
TRUNCATE
REMOVE
DELETE ALL
CLEAR
22. What is known as the set of SQL statements that either executes successfully or none of them have an effect?
joins
transactions
filters
deletions
23. What is generally done after the transactions are executed successfully?
delete
rollback
commit
update
24. What is generally done if an error occurs during the transaction?
delete
rollback
commit
update
25. What does ‘A’ stand for in the ACID property of transactions?
Availability
Accuracy
Adjustability
Atomicity
26. What does ‘C’ stand for in the ACID property of transactions?
Compound
Concrete
Collision
Consistency
27. What is the isolation property of transactions?
statements form a logic unit
database remains consistent
one transaction does not affect the other
transaction effects are recorded permanently
28. What is the command to disable autocommit and launch a transaction?
INITIATE TRANSACTION
START TRANSACTION
DISABLE AUTOCOMMIT
TRANSACTION
29. What is the durability property of transactions?
statements form a logic unit
database remains consistent
one transaction does not affect the other
transaction effects are recorded permanently
30. How many storage engines among the following are transaction-safe?
1
2
3
4
31. Which key declares that an index in one table is related to that in another?
primary
secondary
foreign
cross
32. Deletion of an employee from table also deletes that employee from another table. This kind of delete is called ____________
transparent
concrete
elaborate
cascaded
33. Which storage engine in MySQL provides foreign key support?
TRANSACTION
InnoDB
MyISAM
MEMORY
34. The property of InnoDB that enforces foreign key relationships stay intact is called _____________
atomicity
durability
consistency
referential integrity
35. Which clause names the parent table and the index columns in the table?
REFERENCES
ON DELETE
CONSTRAINT
FOREIGN KEY
36. Which clause is used to remove a foreign key constraint?
REMOVE
DELETE
DROP
EXCLUDE
37. Which keyword is used to specify the foreign key after the table is created?
SETUP
SET
ALTER TABLE
SPECIFY
38. Which clause in the SQL standard controls how NULL values in a composite foreign key are handled when comparing to a primary key.
SET
MATCH
ON DELETE
ON CASCADE
39. In which mode of search is the search string parsed into words and the search looks for rows?
Natural language
Boolean mode
Query expansion
Cross mode
40. The indicator of presence or absence of a word in search is used in which mode?
Natural language
Boolean mode
Query expansion
Cross mode
41. Which search mode uses natural language search as a subroutine?
Natural language
Boolean mode
Query expansion
Cross mode
42. FULLTEXT indexes can be created only for ____________
MyISAM
InnoDB
MEMORY
TRANSITION
43. Which keyword is used to search through natural language fulltext?
MATCH
AGAINST
SEARCH
FIND
44. Which parameter determines the shortest words to index in FULLTEXT indexes?
ft_min_word_len
ft_min_len_word
ft_word_min_len
ft_word_len_word
45. Which statement is used to access an existing Database?
Use
use database.name
USE databasename;
None of the mentioned
46. The “Mysql command line tool” format the results in which of the following format?
Rectangle
Square
Sphere
None of the mentioned
47. The “Mysql command line tool” formats are bounded by _____
+-|
+-*
+-/
+-}
48. Which command is used on Mysql command line tool to return to window command shell?
exit
exit;
exit()
exit();
49. Which command is used in Mysql command line tool to return to window command shell?
exit;
quit;
both exit; and quit;
only exit;
50. Which command is used for taking “server side help” in Mysql command line tool?
/h
/c
/e
None of the mentioned
Submit