Home »
SQL »
SQL MCQs
MCQ | SQL – EXCEPT Clause
SQL EXCEPT Clause MCQ: This section contains the Multiple-Choice Questions & Answers on SQL EXCEPT Clause.
Submitted by Anushree Goswami, on October 18, 2021
SQL EXCEPT Clause MCQs
1. To get a record from one table, which is not present in another table, we can use the clause –
- CONCAT
- COPY
- EXCEPT
- ALTER
Answer: C) EXCEPT
Explanation:
To get a record from one table, which is not present in the other table, we can use the clause EXCEPT.
Discuss this Question
2. SQL EXCEPT statement behaves similar to _____operator in mathematics.
- Sum
- Multiply
- Minus
- Divide
Answer: C) Minus
Explanation:
SQL EXCEPT statement behaves similar to Minus operator in mathematics.
Discuss this Question
3. Select the correct rule of SQL EXCEPT.
- There must be the same number of columns in each table and the same order in every select statement.
- It is desirable that the columns have similar or compatible data types.
- Both SELECT statements must have the same fields in their respective columns.
- All of the above
Answer: D) All of the above
Explanation:
Rules of SQL EXCEPT are:
- There must be the same number of columns in each table and the same order in every select statement.
- It is desirable that the columns have similar or compatible data types.
- Both SELECT statements must have the same fields in their respective columns.
Discuss this Question
4. Select the correct syntax of SQL EXCEPT.
-
SELECT Column1 FROM Table1
SELECT Column2 FROM Table2
EXCEPT;
-
EXCEPT
SELECT Column1 FROM Table1
SELECT Column2 FROM Table2;
SELECT Column1 FROM Table1
EXCEPT
SELECT Column2 FROM Table2;
- None of the above
Answer: C)
Explanation:
The correct syntax of SQL EXCEPT is,
SELECT Column1 FROM Table1
EXCEPT
SELECT Column2 FROM Table2;
Discuss this Question
5. SQL EXCEPT clause is supported in –
- MySQL
- PostgreSQL
- Both A and B
- None of the above
Answer: B) PostgreSQL
Explanation:
SQL EXCEPT clause is supported in PostgreSQL and not in MySQL.
Discuss this Question
6. What is TRUE about SQL EXCEPT clause?
- The result is purged of duplicates
- Duplicate records are not removed
- Only one column can be compared by a clause
- None of the above
Answer: A) The result is purged of duplicates
Explanation:
In the case of the SQL EXCEPT clause, the result is purged of duplicates.
Discuss this Question
7. What is TRUE about NOT IN clause?
- The result is purged of duplicates
- Duplicate records are not removed
- Performs column-by-column comparisons
- None of the above
Answer: B) Duplicate records are not removed
Explanation:
In the case of the NOT IN clause, Duplicate records are not removed.
Discuss this Question
8. ORDER BY clause comes ____ the EXCEPT clause in SQL statement?
- Before
- After
- Flexible to before or after
- None of the above
Answer: B) After
Explanation:
ORDER BY clauses comes after the EXCEPT clause in SQL statement.
Discuss this Question
9. SQL EXCEPT returns the record from -
- First SELECT Query
- Second SELECT Query
- Third SELECT Query
- None of the above
Answer: A) First SELECT Query
Explanation:
SQL EXCEPT returns the record from the first SELECT Query which is not present in the second SELECT Query.
Discuss this Question
10. Using which clause, can SQL EXCEPT be used in single table?
- TO
- AS
- WHERE
- IN
Answer: C) WHERE
Explanation:
Using WHERE clause, SQL EXCEPT can be used in single table.
Discuss this Question