Vidyalelo
SQL · all questions

SQL
practice.

Practice every MCQ with options. Use Show answers when you want the correct option and solution.

79

Questions

3/4

Page

Pick an option on a question to see the right answer and solution.

Which of the following query finds the total rating of the sailors who have reserved boat "103"?

Select an option to see the answer and solution.

The SELECT statement SELECT 'Hi' FROM DUAL WHERE NULL = NULL; Outputs

Select an option to see the answer and solution.

Which of the following is illegal?

Select an option to see the answer and solution.

If a query involves NOT, AND, OR with no parenthesis

Select an option to see the answer and solution.

Let the statement
SELECT column1 FROM myTable;
return 10 rows. The statement
SELECT ALL column1 FROM myTable;
will return

Select an option to see the answer and solution.

Table employee has 10 records. It has a non-NULL SALARY column which is also UNIQUE.
The SQL statement
SELECT COUNT(*) FROM employee WHERE SALARY > ALL (SELECT SALARY FROM EMPLOYEE);
prints

Select an option to see the answer and solution.

Which of the following SQL commands can be used to add data to a database table?

Select an option to see the answer and solution.

Which of the following join is also called as an 'inner-join'?

Select an option to see the answer and solution.

Which of the following is NOT a type of SQL constraint?

Select an option to see the answer and solution.

What is an SQL virtual table that is constructed from other tables?

Select an option to see the answer and solution.

When using the SQL INSERT statement:

Select an option to see the answer and solution.

The SQL ALTER statement can be used to:

Select an option to see the answer and solution.

What SQL command can be used to delete columns from a table?

Select an option to see the answer and solution.

What SQL command can be used to add columns to a table?

Select an option to see the answer and solution.

The command to remove rows from a table 'CUSTOMER' is:

Select an option to see the answer and solution.

The SQL WHERE clause:

Select an option to see the answer and solution.

Which of the following is the original purpose of SQL?

Select an option to see the answer and solution.

The wildcard in a WHERE clause is useful when?

Select an option to see the answer and solution.

The command to eliminate a table from a database is:

Select an option to see the answer and solution.

The SQL keyword(s) ________ is used with wildcards.

Select an option to see the answer and solution.