Hi Lev,
You can have a look at Cursors - SAP HANA SQLScript Reference - SAP Library
However, the performance of using cursor is poor. See Avoid Using Cursors - SAP HANA SQLScript Reference - SAP Library
"Avoid Using Cursors: Check if use of cursors can be replaced by (a flow of) SQL statements for better opportunities for optimization and exploiting parallel execution."
Best regards,
Wenjun