I actually found something here but I need a syntax for multiple tables. Example:
DECLARE
CURSOR select_results IS
SELECT T1.ID, T2.DP FROM T1, T2 WHERE T1.ROW_ID=T2.DP;
select_result T1.ID%ROWTYPE, T2.DP%ROWTYPE;
BEGIN
-- DO SOMETHING
END;
Could someone explain how can I create such custom table variable and is it possible at all? Thanks in advance!