Order of evaluation-pl/sql expressions , PL-SQL Programming

Order of Evaluation

When you do not use the parentheses to specify the order of evaluation, the operator precedence determine the order. Now compare the expressions below:

NOT (valid AND done)         |       NOT valid AND done


When the Boolean variables valid and complete the value FALSE, the first expression yields TRUE. Though, the second expression yields FALSE as NOT has a higher precedence than AND. So, the second expression is equivalent to:

(NOT valid) AND done
In the example below, notice that if valid has the value FALSE, the entire expression yields FALSE regardless of the value of done:

valid AND done

Similarly, in the next illustration, when valid has the value TRUE, the entire expression yields TRUE regardless of the value of done:

valid OR done

Posted Date: 10/3/2012 5:17:40 AM | Location : United States







Related Discussions:- Order of evaluation-pl/sql expressions , Assignment Help, Ask Question on Order of evaluation-pl/sql expressions , Get Answer, Expert's Help, Order of evaluation-pl/sql expressions Discussions

Write discussion on Order of evaluation-pl/sql expressions
Your posts are moderated
Related Questions
FOR-LOOP While the number of iterations through a WHILE loop is unknown till the loop completes, then the number of iterations through a FOR loop is known before the loop is ent

I want someone to write a TSQL function that returns the name of the ODBC DSN. I will use the queries below, to get information about the connection, but none of these return th

heap sort program in pl/sql

Parameter SELF in pl/sql The MEMBER methods recognize a built-in parameter named SELF that is an instance of the object type. Whether declared explicitly or implicitly, it is

INSERT Statement The INSERT statement adds fresh rows of data to the specified database table or view. Syntax:

Equivalences & Rewrite Rules: If notice that as well as allowing us to prove trivial theorems, and tautologies enable us to establish that certain sentences are saying the sam

%ROWTYPE: This attribute gives a record type which represents a row in the database table or a row fetched from a formerly declared cursor. The Fields in the record and corresp

Logical Connectives - SQL SQL's extended truth tables in which the symbol, for unknown, appears along with the usual T and F. Negation (NOT, ¬) Conjunction (

EXECUTE Privilege To call an invoker-rights routine straightforwardly, the users should have the EXECUTE privilege on that routine. By yielding the privilege, you permit a user

Parameter and Keyword Description: SQL: This SQL is the name of the implicit SQL cursor. %FOUND: This attribute results TRUE if an INSERT, DELETE, or UPDATE state