Utsav Sinha
Utsav Sinha

Reputation: 635

What is the equivalent of PL/SQL Records in SAP HANA and how can we use it?

If I want to store an entire row of a database table into a variable just like we do using records in PL/SQL, how can I perform the similar function in SAP HANA?

Upvotes: 0

Views: 1206

Answers (1)

Lars Br.
Lars Br.

Reputation: 10396

There is nothing like that in SAP HANA. You can iterate over a cursor and in the loop the row variable is accessible.

example:

do 
begin
declare cursor mc for 
        select * from my_table;

declare my_ID INTEGER;

for mc_row as mc do        

  my_ID = mc_row.ID;

  select :my_ID from dummy;

end for;
end

Upvotes: 1

Related Questions