cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

What exactly the difference between table function and scaler function in SAP HANA

abhilashvb
Explorer
0 Likes
2,614

What exactly the difference between table function and scaler function in SAP HANA? can we use these functions in calculation view?

Accepted Solutions (0)

Answers (2)

Answers (2)

SowmyaSurekha
Explorer
0 Likes

hi,

Scalar functions (sometimes referred to as User-Defined Functions / UDFs) return a single value as a return value, not as a result set, and can be used in most places within a query or SET statement, except for the FROM clause (and maybe other places?). Also, scalar functions can be called via EXEC, just like Stored Procedures, though there are not many occasions to make use of this ability.

table functions are functions that users can query like any other database tables, and you can add it as a data source in your graphical calculation views. You can use the from clause of a SQL statement to call a table function.

regards,

sowmya.

Cocquerel
Active Contributor
0 Likes

The difference is the ouput parameter type.
Scaler function is returning a single scalar value.

Table function is returning a table with several rows and columns.