Record Type Assignment Help

Assignment Help: >> Cursors - Record Type

Record Type:

Record type variables are declared using the keyword RECORD. The subsequent example displays this:

Example

DECLARE

TYPE TREC IS RECORD(A VARCHAR2(20),B NUMBER);

TVAR TREC;

CURSOR C1 IS SELECT PNAME,PCODE FROM PRODUCT;

BEGIN

OPEN C1;

LOOP

FETCH C1 INTO TVAR;

EXIT WHEN C1%NOTFOUND;

DBMS_OUTPUT.PUT_LINE(TVAR.A||'    '||TVAR.B); END LOOP;

CLOSE C1;

END;

The Output will look like:

navtal lock                  101

storewell                    102

 cinthol old                  103

1.5 ton a/c                  104

1.0 ton a/c                  105

0.75 ton a/c                106

puf refrigerator           107

hair dye                      108

shaving cream            109

jumpin juke                 110

thomas cook               111

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd