HANA - Variable

Scope

Session, Global

Example

Sqlscript

Global

Doc

  • Set
CREATE PROCEDURE CHANGE_SESSION_VAR (IN NEW_VALUE NVARCHAR(50))
AS
BEGIN
	SET 'MY_VAR' = :new_value;
END;
  • Retrieve
CREATE FUNCTION GET_VALUE ()
RETURNS var NVARCHAR(50)
AS
BEGIN
	var = SESSION_CONTEXT('MY_VAR');
END;

Powered by ComboStrap