SQL MCQ Quiz Hub

SQL MCQ SET 16

Choose a topic to test your knowledge and improve your SQL skills

Which keyword used with UNION retains duplicate rows?





✅ Correct Answer: 1

Which clause is used to sort a UNION result as a whole?





✅ Correct Answer: 2

Suppose it is desired that UNION operation should return not more than 3 rows. Which keyword is used for this?





✅ Correct Answer: 1

Which table is used to run a UNION-type query on MyISAM tables?





✅ Correct Answer: 2

SELECT on a MERGE table is like _____________





✅ Correct Answer: 1

Which of these is also known as a virtual table?





✅ Correct Answer: 4

What is xyz in the following MySQL statement?





✅ Correct Answer: 3

What is abc in the following MySQL statement?





✅ Correct Answer: 2

A view can refer to multiple tables via __________





✅ Correct Answer: 2

A view can be deleted using the command __________





✅ Correct Answer: 4

What cannot be done on a view?





✅ Correct Answer: 3

What can be used to check for views that have been invalidated by DROP or ALTER operations?





✅ Correct Answer: 4

Which of the following does not support a materialized view?





✅ Correct Answer: 1

To perform a delete on a single-table, how is the name of a column qualified?





✅ Correct Answer: 1

What is xyz in the following SQL statement?





✅ Correct Answer: 2

What is abc in the following SQL statement?





✅ Correct Answer: 1

What is x in the following MySQL statement?





✅ Correct Answer: 2

What is the value of val2 in the following MySQL statement?





✅ Correct Answer: 2

UPDATE statement is a DML statement. What does DML stand for?





✅ Correct Answer: 1

Which keyword in the UPDATE statement is used to assign values to columns?





✅ Correct Answer: 2

Which keyword is used to delete all the rows from the table?





✅ Correct Answer: 1

What is known as the set of SQL statements that either executes successfully or none of them have an effect?





✅ Correct Answer: 2

What is generally done after the transactions are executed successfully?





✅ Correct Answer: 3

What is generally done if an error occurs during the transaction?





✅ Correct Answer: 2

What does ‘A’ stand for in the ACID property of transactions?





✅ Correct Answer: 4

What does ‘C’ stand for in the ACID property of transactions?





✅ Correct Answer: 4

What is the isolation property of transactions?





✅ Correct Answer: 3

What is the command to disable autocommit and launch a transaction?





✅ Correct Answer: 2

What is the durability property of transactions?





✅ Correct Answer: 4

How many storage engines among the following are transaction-safe?





✅ Correct Answer: 2

Which key declares that an index in one table is related to that in another?





✅ Correct Answer: 3

Deletion of an employee from table also deletes that employee from another table. This kind of delete is called ____________





✅ Correct Answer: 4

Which storage engine in MySQL provides foreign key support?





✅ Correct Answer: 2

The property of InnoDB that enforces foreign key relationships stay intact is called _____________





✅ Correct Answer: 4

Which clause names the parent table and the index columns in the table?





✅ Correct Answer: 1

Which clause is used to remove a foreign key constraint?





✅ Correct Answer: 3

Which keyword is used to specify the foreign key after the table is created?





✅ Correct Answer: 3

Which clause in the SQL standard controls how NULL values in a composite foreign key are handled when comparing to a primary key.





✅ Correct Answer: 2

In which mode of search is the search string parsed into words and the search looks for rows?





✅ Correct Answer: 1

The indicator of presence or absence of a word in search is used in which mode?





✅ Correct Answer: 2

Which search mode uses natural language search as a subroutine?





✅ Correct Answer: 3

FULLTEXT indexes can be created only for ____________





✅ Correct Answer: 1

Which keyword is used to search through natural language fulltext?





✅ Correct Answer: 1

Which parameter determines the shortest words to index in FULLTEXT indexes?





✅ Correct Answer: 1

Which statement is used to access an existing Database?





✅ Correct Answer: 3

The “Mysql command line tool” format the results in which of the following format?





✅ Correct Answer: 1

The “Mysql command line tool” formats are bounded by _____





✅ Correct Answer: 1

Which command is used on Mysql command line tool to return to window command shell?





✅ Correct Answer: 1

Which command is used in Mysql command line tool to return to window command shell?





✅ Correct Answer: 3

Which command is used for taking “server side help” in Mysql command line tool?





✅ Correct Answer: 1