PL/SQL - Operators MCQ Questions And Answers
Operators MCQs : This section focuses on "Operators" in Pl/Sql. These Multiple Choice Questions (MCQ) should be practiced to improve the Pl/Sql skills required for various interviews (campus interview, walk-in interview, company interview), placements, entrance exams and other competitive examinations.
1. Which of the following operator adds two operands?
A. Subtracts
B. Addition
C. Multiplies
D. Exponentiation
View Answer
Ans : B
Explanation: Addition operator adds two operands
2. ___________ compare two expressions or values and return a Boolean result.
A. Arithmetic operators
B. Comparison operators
C. Relational operators
D. Logical operators
View Answer
Ans : C
Explanation: Relational operators compare two expressions or values and return a Boolean result.
3. Which operator checks if the values of two operands are equal or not, if yes then condition becomes true?
A. not equal
B. greater than
C. less than
D. equal
View Answer
Ans : D
Explanation: Equal (=) : Checks if the values of two operands are equal or not, if yes then condition becomes true.
4. How many results comparison operators can give?
A. 1
B. 2
C. 3
D. 4
View Answer
Ans : C
Explanation: Comparison operators are used for comparing one expression to another. The result is always either TRUE, FALSE or NULL.
5. The ______ operator tests whether a value lies in a specified range
A. LIKE
B. BETWEEN
C. IN
D. NULL
View Answer
Ans : B
Explanation: The BETWEEN operator tests whether a value lies in a specified range.
6. The LIKE operator compares a character, string, or CLOB value to a pattern and returns TRUE if the value matches the pattern and FALSE if it does not.
A. TRUE
B. FALSE
C. Can be true or false
D. Can not say
View Answer
Ans : A
Explanation: True, The LIKE operator compares a character, string, or CLOB value to a pattern and returns TRUE if the value matches the pattern and FALSE if it does not.
7. Variable A holds 10 and variable B holds 5, then (A = B) is?
A. TRUE
B. Not true
C. Null
D. Error
View Answer
Ans : B
Explanation: (A = B) is not true.
8. Variable A holds true and variable B holds false, then not (A and B) is?
A. TRUE
B. FALSE
C. Null
D. Error
View Answer
Ans : A
Explanation: not (A and B) is true.
9. Which operator has highest precedence?
A. identity
B. negation
C. addition
D. exponentiation
View Answer
Ans : D
Explanation: exponentiation has highest precedence.
10. The IN operator tests set membership. x IN (set) means that x is equal to any member of set.
A. Yes
B. No
C. Can be yes or no
D. Can not say
View Answer
Ans : A
Explanation: Yes, The IN operator tests set membership. x IN (set) means that x is equal to any member of set.
Discussion