Plsql-logical-operators
提供:Dev Guides
PL/SQLの論理演算子
次の表に、PL/SQLでサポートされる論理演算子を示します。 これらのすべての演算子はブール値オペランドで機能し、ブール値の結果を生成します。 変数Aがtrueを保持し、変数Bがfalseを保持すると仮定します-
Operator | Description | Examples |
---|---|---|
and | Called the logical AND operator. If both the operands are true then condition becomes true. | (A and B) is false. |
or | Called the logical OR Operator. If any of the two operands is true then condition becomes true. | (A or B) is true. |
not | Called the logical NOT Operator. Used to reverse the logical state of its operand. If a condition is true then Logical NOT operator will make it false. | not (A and B) is true. |
例
上記のコードがSQLプロンプトで実行されると、次の結果が生成されます-