Home »
SQL »
SQL MCQs
MCQ | SQL – Operators
SQL Operators MCQ: This section contains the Multiple-Choice Questions & Answers on SQL Operators.
Submitted by Anushree Goswami, on August 19, 2021
1. Using a WHERE clause in a SQL query is used to specify SQL reserved words and characters, known as ____?
- Operators
- Data Types
- Numbers
- Syntax
Answer: A) Operators
Explanation:
Using a WHERE clause in a SQL query is used to specify SQL reserved words and characters, known as Operators.
2. SQL Operator can be,
- Unary
- Binary
- Both A and B
- None of the above
Answer: C) Both A and B
Explanation:
SQL Operator can be Unary and Binary.
3. Number of operands used by Unary Operator is?
- 1
- 2
- 3
- 4
Answer: A) 1
Explanation:
Number of operators used by Unary Operand is 1.
4. Numbers of operand used by Binary Operators are?
- 1
- 2
- 3
- 4
Answer: B) 2
Explanation:
Numbers of operand used by Binary Operand are 2.
5. Which one of the syntaxes given below is of Binary Operator?
- Operator SQL _Operand
- Operand2 SQL _Operator Operand1
- Operand1 SQL _Operator Operand1
- Operand1 SQL _Operator Operand2
Answer: D) Operand1 SQL _Operator Operand2
Explanation:
Operand1 SQL _Operator Operand2 is the syntax of Binary Operator.
6. When an expression includes ___ SQL operator(s), the sequence in which they are evaluated is known as the SQL operator's precedence.
- 0
- 1
- Multiple
- NULL
Answer: C) Multiple
Explanation:
When an expression includes Multiple SQL operators, the sequence in which they are evaluated is known as the SQL operator's precedence.
7. Which of the statement is true?
- The precedence-low operators are evaluated last in SQL.
- The precedence-high operators are evaluated first in SQL.
- Both A and B
- None of the above
Answer: C) Both A and B
Explanation:
The precedence-high operators are evaluated first in SQL and precedence-low operators are evaluated last in SQL.
8. Select the correct order of precedence among the following?
- OR > NOT > + > **
- NOT > OR > ** > +
- ** > + > OR > NOT
- ** > + > NOT > OR
Answer: D) ** > + > NOT > OR
Explanation:
Exponentiation operator (**) > Identity operator (+) > Logical Negation Operator (NOT) > Inclusion Operator (OR).
9. Which of the following statement is correct?
- Comparison Operator has higher precedence than Conjuction Operator.
- Identity Operator has higher precedence than Multiplication Operator.
- Both A and B
- None of the above
Answer: C) Both A and B
Explanation:
Comparison Operator has higher precedence than Conjunction Operator and Identity Operator has higher precedence than Multiplication Operator.
10. Which of these are the types of operators?
- Arithmetic
- Comparison
- Set
- All of the above
Answer: D) All of the above
Explanation:
Arithmetic, Comparison, and Set, all are types of operators.
11. Which of the following is NOT the SQL Arithmetic Operator?
- Addition
- Subtraction
- Unary
- Modulus
Answer: C) Unary
Explanation:
Addition, Subtraction and Modulus are all the SQL Arithmetic Operators.
12. Which of the following statement is TRUE for SQL Additional Operator?
- SELECT operand1-operand2;
- SELECT operand1*operand2;
- SELECT operand1+operand2;
- SELECT operand1>operand2;
Answer: C) SELECT operand1+operand2;
Explanation:
SELECT operand1+operand2; is the correct statement for SQL Additional Operator.
13. The numerical values of two ___ of the ___ table can be easily subtracted using SQL Subtraction Operator.
- Rows, same
- Columns, same
- Rows, different
- Columns, different
Answer: B) Columns, same
Explanation:
The numerical values of two columns of the same table can be easily subtracted using SQL Subtraction Operator.
14. Which of the following statement is correct for SQL Multiplication Operator?
- SELECT Operand1+Operand2;
- SELECT Operand1*Operand2;
- SELECT Operand1**Operand2;
- SELECT Operand1<Operand2;
Answer: B) SELECT Operand1*Operand2;
Explanation:
SELECT Operand1*Operand2 statement is correct for SQL Multiplication Operator.
15. SQL Division operator divides the operand on the ____ side by the operand on the ____ side.
- Left, Left
- Right, Left
- Left, Right
- Right, Right
Answer: C) Left, Right
Explanation:
SQL Division operator divides the operand on the left side by the operand on the right side.
16. The SQL Modulus Operator returns the,
- Quotient
- Percentage
- Sum
- Reminder
Answer: D) Reminder
Explanation:
The SQL Modulus Operator returns the Reminder.
17. Which of the following is not the SQL Comparison Operator?
- SQL Equal Operator (=)
- SQL Less Than Operator (<)
- SQL Greater Than Operator (>)
- All of the above
Answer: D) All of the above
Explanation:
SQL Equal Operator (=), SQL Less Than Operator (<), and SQL Greater Than Operator (>) are all SQL Comparison Operators.
18. Using which SQL Comparison Operator can we find the data that matches our query?
- SQL Not Equal Operator (!=)
- SQL Equal Operator (=)
- SQL Greater Than Operator (>)
- SQL Less Than Operator (<)
Answer: B) SQL Equal Operator (=)
Explanation:
Using SQL Equal Operator from SQL Comparison Operators, we can find the data that matches our query.
19. Which of the following is a SQL Logical Operator?
- SQL ALL Operator
- SQL OR Operator
- SQL LIKE Operator
- All of the above
Answer: D) All of the above
Explanation:
SQL ALL, SQL OR and SQL LIKE are all SQL Logical Operators.
20. Which of the following is not a SQL Logical Operator?
- SQL Equal Operator
- SQL ANY Operator
- SQL BETWEEN Operator
- SQL IN Operator
Answer: A) SQL Equal Operator
Explanation:
SQL ANY, SQL BETWEEN, and SQL IN Operators are all SQL Logical Operators.