SAP HANA SQLScript

Procedures, Functions & Libraries

25 flashcards · answers and spaced-repetition review in the KnowCard app

A colleague wants to hide business logic by shipping a procedure WITH ENCRYPTION. What must you warn them about?
Inside another procedure/block, you write statustexts(iv_langu => 'DE', et_result => lt_x); with no CALL. Valid?
Calling a procedure, you pass a brand-new variable name to an OUT table parameter that was never declared. Error?
Can a SQLScript procedure call itself? Since which version, and what's the limit?
The DETERMINISTIC keyword sounds like a free speed-up for a scalar UDF. On SPS 05, what actually happens?
You need a read-only subroutine whose result you can join inside a SELECT. Procedure or function — and why?
Why does wrapping simple row logic in a scalar UDF often hurt SAP HANA performance?
Which SQL can a scalar UDF contain, and what may it call?
What must the return of a table UDF look like, and what's its default security mode?
Where can you place a table UDF versus a scalar UDF inside a query?
Inside a nested BEGIN...END block you DECLARE a variable with the same name as an outer one. What happens to the outer variable?
You want to run a multi-statement SQLScript snippet in the SQL console without creating any database object. What construct do you use?
In an anonymous block, how do you feed an IN value and see an OUT table in the console?
What is the minimal, mandatory form of a CREATE PROCEDURE statement?
You declare a procedure parameter as INOUT with a table type. Why is that rejected?
Your procedure has an OUT table parameter that a branch might never assign, and calls fail with an error. What default fixes it?
A procedure has a generic OUT parameter TABLE(...). It runs in the console but a second procedure calling it fails. Why?
You add READS SQL DATA to a procedure, but it also CALLs a helper procedure. What's the catch?
A scalar UDF udf_now returns two named values, rv_date and rv_time. How do you read them?
What does a user-defined library give you that plain procedures/functions can't, and how long do its variables live?
How do you reference a library's public component from outside the library, and how did that differ before SPS 04?
What does this fail on? ``` lt_x = udf_status_texts('EN'); ``` (udf_status_texts is a table UDF)
SQL SECURITY DEFINER vs INVOKER on a procedure — whose authorizations get checked at run time?
You try to use a library constant directly in a query's TOP clause and in SELECT ... INTO a library variable. Why do both fail?
You want one CASE to set two output columns (price class AND message) in a procedure. Why do you need two CASEs?

Start learning today

Free to start — download the app or use it in your browser.

Get it on App StoreGet it on Google Play