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
Project Description: I have two types of data sources. One that is a list in SharePoint and another that is an access desktop database. The access desktop database is fairly com

Keyword & Parameter Description: WHEN: This keyword introduces the exception handler. You can have many exceptions execute the similar sequence of the statements by follo

Package STANDARD package named STANDARD defines the PL/SQL atmosphere. The package specification globally declares the exceptions, types, and subprograms that are available a

Literals A literal is an explicit numeric, string, character, or Boolean value not represented by an identifier. Numeric literal 147 and the Boolean literal FALSE are some of

Manipulating Individual Elements Faraway you have manipulated an entire collection. Within the SQL, to manipulate the individual elements of the collection, and then use the ope

In Packages The Forward declarations also group logically related subprograms in the package. The subprogram specifications go in the package specification, & the subprogram b

UNNEST operator in SQL The inverse operator of GROUP is UNGROUP. SQL has an operator, UNNEST, that can be used for similar purposes, but its method of invocation is somewhat p

Updating a Variable Assignment of an attribute value in a variable of a structured type Synatx: SET SN.C = 'S2'; As in Example the entire statement is equivalent to a

Advantages of Invoker Rights The Invoker-rights routines centralize the data retrieval. They are particularly helpful in applications which store data in various schemas. In su

Recursion The Recursion is a powerful method for simplify the design of the algorithms. Principally, the recursion means the self-reference. In the recursive mathematical serie