oracle record
-------- begining of the structure of test --------
/*
userId userName
1 John1
2 John2
3 John3
4 John4
5 John5
*/
------------- record 1 ---------------
declare
v_record test%ROWTYPE;
begin
select * into v_record from test where userid = 4;
dbms_output.put_line(v_record.userid ||','|| v_record.username);
end;
------------- record 2 ---------------
declare
type v_record is record(userid test.userid%type, username varchar2(20));
real_record v_record;
begin
select userid, username into real_record from test where userid = 4;
dbms_output.put_line(real_record.userid ||','|| real_record.username);
end;