Register Login

SQL Operators in SAP HANA

Updated May 18, 2018

SQL Operators specify conditions in an SQL statement

In SAP HANA, the importance of SQL operators is something that cannot be expressed in words. The SQL operators carry out the task on distinct data items and return a consequence. Operands or arguments are the names by which the data items are called. An operator helps in manipulating individual data items. Special characters or keywords are used by the operators. For instance, by an asterisk (*) the multiplication operator is signified and by the keywords IS NULL or IS NOT NULL, the operator that tests for nulls is represented.

Types of SQL Operators:

The SQL operators can be of various types which have been mentioned below:

SQL Unary Operator:

In the numeric datatype category, it completes such a procedure which has only one expression of any of the datatypes. Although only on integer datatypes the bitwise operator (~) is used, on any numeric datatype unary operators can be used. The + sign indicates that the numeric value is positive while the – sign represents negative and ~ represents bitwise NOT.

SQL Arithmetic Operator:

On numeric operands it can perform arithmetical operations. Addition, subtraction, multiplication and division include the SQL arithmetic operator. The addition and subtraction can be used in date arithmetic.

SQL Assignment operator:

A value to a variable or of a column or field of a table is assigned by SQL assignment operator ( = ).

SQL Logical Operator:

They return a true or false value to associate one or more true or false values. OR, AND , NOT, BETWEEN, SOME,IN, ANY, ALL, LIKE and EXISTS are the logical operators.

SQL Comparison Operator:

To match between two values this calculated symbol is used. TRUE, FALSE, or UNKNOWN can be the results.

SQL Bitwise Operator:

Among two integer expressions of the integer data type category, it performs bit manipulations. & ( Bitwise AND ), ^ ( Bitwise Exclusive OR or XOR ) and | ( Bitwise OR ) are the bitwise operators. INT, BINARY, VARBINARY TINYINT, SMALLINT, and BIT are the valid datatypes.

Although there are so many types of SQL operators, Comparison Operators and Logical Operators are usually the two main types of operators which are used to filter the data to be selected in the HAVING clause WHERE clause.

Thus, it can be concluded by stating that these operators are used with SQL clause or SQL select statement to get the necessary result.


×