navigation

OPERATORS IN SAP HANA

SAP HANA Operator can be used for calculation, value comparison or to assign value. SAP HANA Contain below operators-
 1)Unary and Binary Operator
 2)Arithmetic Operator
 3)String Operators
 4)Comparison Operator
 5)Logical Operator
 6)Set Operator
Unary and Binary Operator

Operator
Operation
Description
Unary
A Unary operator applies to one operand
Unary plus operator(+)
Unary negation operator(-)
Logical negation(NOT)
Binary
A Binary Operator applies on two operand
Multiplicative operators ( *, / )
Additive operators ( +,- )
Comparison operators ( =,!=,<,>,<=,>=)
Logical operators ( AND, OR )
Arithmetic Operator
Addition (+)
Subtraction (-)
Multiplication ( * )
Division ( / )
String Operator
A String Operator is a concatenation operator which combines two items such as strings, expressions or constants into one.
Two Vertical Bar "||" is used as the concatenation operator.
Comparison Operator
Comparison operator is used to compare two operand.
Below are list of Comparison Operator-
 Equal to ( = )
Greater Than ( > )
Less Than ( < )
Greater than or equal to ( > = )
Less than or equal to ( < = )
 Not Equal (!= , <> )
Logical Operator
Logical operator is used in search criteria.
E.g. WHERE condition1 AND / OR / NOT condition2
Below is list of logical operator –
AND - (e.g. WHERE condition1 AND condition2)
If both Condition1 AND Condition2 are true, then Combine condition is true else it will false.
OR – (e.g. WHERE condition1 OR condition2)
If Condition1 OR Condition2 is true, then combine condition is true or false if both Conditions are false.
NOT - (e.g. WHERE NOT condition)
NOT condition is true If Condition is false.
Set Operators
UNION - Combines two or many select statements or query without duplicate.
UNION ALL - Combines two or many select statements or query, including all duplicate row.
INTERSECT - Combines two or many select statements or query, and return all common rows.
EXCEPT - Takes the output from the first query and removes row selected by the second query.


No comments:

Post a Comment