Logical operators-pl/sql expressions , PL-SQL Programming

Logical Operators


The logical operators AND, NOT, and OR follow the tri-state logic shown in table below. The AND and OR are binary operators; NOT is a unary operator.

 

1204_Logical Operators.jpg


                    Table: Logic Truth Table


As the truth table shown below, the AND returns TRUE only if both its operands are true. On the other hand, the OR returns TRUE if either of its operands is true. The NOT returns the opposite value (logical negation) of its operand. For illustration, NOT TRUE returns FALSE.

The NOT NULL returns NULL as nulls are indeterminate. It follows that if you apply the NOT operator to a null, the answer is also indeterminate.

Posted Date: 10/3/2012 5:15:37 AM | Location : United States







Related Discussions:- Logical operators-pl/sql expressions , Assignment Help, Ask Question on Logical operators-pl/sql expressions , Get Answer, Expert's Help, Logical operators-pl/sql expressions Discussions

Write discussion on Logical operators-pl/sql expressions
Your posts are moderated
Related Questions
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

Parameter Default Values As the illustration below shows, you can initialize the IN parameters to the default values. In that way, you can pass various numbers of actual par


Example of Cast Operator So long as CAST is used as shown, we could obtain the total marks for each exam in similar fashion, using SUM (Mark) AS TotalMarks. However, this giv

Using FOR UPDATE If you declare a cursor which will be referenced in the CURRENT OF clause of an UPDATE or DELETE statement, you should use the FOR UPDATE clause to obtain an

Mutual Recursion The Subprograms are mutually recursive if they directly or indirectly call each other. In the illustration below, the Boolean functions odd & even, that dete

Entering and Exiting If you enter the executable part of an autonomous routine, the major transaction suspends. When you exit the routine, the major transaction resumes. To ex

Methods: In normal, a method is a subprogram declared in an object type specification using the keyword MEMBER or STATIC. The method cannot have similar name as the object typ

Example of COALESCE operator Example: Give the total of marks for each exam (simplified solution) SELECT CourseId, COALESCE ((SELECT SUM (Mark) FROM EXAM_MARK AS EM

Committing and Rolling Back The COMMIT and ROLLBACK end the active autonomous transaction but do not exit the autonomous routine. As the figure shows, if one transaction ends,