Examveda
Examveda

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

A. NOT will be evaluated first; AND will be evaluated second; OR will be evaluated last.

B. NOT will be evaluated first; OR will be evaluated second; AND will be evaluated last.

C. AND will be evaluated first; OR will be evaluated second; NOT will be evaluated last.

D. The order of occurrence determines the order of evaluation.

Answer: Option A

Solution(By Examveda Team)

In SQL, when a query involves NOT, AND, and OR operators without parentheses, the NOT operator is evaluated first, followed by the AND operator, and then the OR operator. This order of evaluation is important for understanding the logic of the query. Therefore, Option A is the correct choice for the order of evaluation.

This Question Belongs to SQL >> Sql Miscellaneous

Join The Discussion

Comments ( 1 )

  1. Lingeswaran Nagarajan
    Lingeswaran Nagarajan :
    7 years ago

    As per the order they are placed in the query, they query will be executed.

Related Questions on Sql Miscellaneous