![]() Related Questions Declarative part, Executable part and Exception part. Datatypes PL/SQL Latest Answer : All has given the right answer and I am repeating the same.There are the three component of PL/SQL program block1) Declarative( Where you can decalre the variable which would be used as a part of exceution using DECLARE statement).2) Exceution( Part of ... Some scalar data types such as NUMBER, VARCHAR2, DATE, CHAR, LONG, BOOLEAN.Some composite data types such as RECORD & TABLE. Latest Answer : ScalarCHARVARCHAR2 LONGLONG RAWNUMBER [(precision, scale)]BINARY_INTEGERPLS_INTEGERBOOLEAN Composite TypesRECORDTABLEVARRAYLOB TypesBFILEBLOBCLOBNCLOBReference TypesREF CURSORREF object_type ... % TYPE provides the data type of a variable or a database column to that variable. % ROWTYPE provides the record type that represents a entire row of a table or view Latest Answer : %TYPE is used to declare a variable with the same type as that of a database table column.%ROWTYPE is used to declare a record as same type found in database table.These two provides data independence and allows you to adopt database changes due to new ... % ROWTYPE is to be used whenever query returns a entire row of a table or view. TYPE rec RECORD is to be used whenever query returns columns of differenttable or views Latest Answer : %ROWTYPE is used when you need to work with complete record.TYPE RECORD is used to create your own data type with specificed number of values to hold.Suppose If a table has 20 columns and you need to work with only seven columns . If I use %ROWTYPE, ... Objects of type TABLE are called "PL/SQL tables", which are modeled as (but not the same as) database tables, PL/SQL tables use a primary PL/SQL tables Latest Answer : Example for PL/SQL table:==================In the below block "typlsql" and "ty_plsql2" are PL/SQL tablesdeclaretype ty_plsql is record ( empno number, ename varchar2(50));TYPE ty_plsql2 is table of ty_plsql;ty_plsql1 ty_plsql2;j number;cursor ... Cursor is a named private SQL area from where information can be accessed. Cursors are required to process rows individually for queries returning multiple rows. Latest Answer : Cursor is an small memory allocation or workstation where operation or processing is done on the data.Types of attribute of cursor are-:1)ROWCOUNT2)ISOPEN3)FOUND4)NOTFOUND ... There are two types of cursors, Implicit Cursor and Explicit Cursor.PL/SQL uses Implicit Cursors for queries.User defined cursors are called Explicit Cursors. They can be declared and Latest Answer : Cursors are of two types1. Implicit Cursors: - Whenever we execute sql statements oracle server assigns a work area called private sql area to store precessed infomation. The most recently used work are can be accessed using SQL%. In implicit cursors ... DECLARE CURSOR cursor name, OPEN cursor name, FETCH cursor name INTO or Record types, CLOSE cursor name. Latest Answer : There are two ways of processing a cursor output. These mainly depend on the type of cursor used. Cursors can be1) Static : Declared in declarations section with a definate command2) Dynamic : Usually passed a string, which ... %ISOPEN - to check whether cursor is open or not % ROWCOUNT - number of rows fetched/updated/deleted. % FOUND - to check whether cursor has fetched any row. True Latest Answer : %ISOPEN - To check whether cursor is open or not.Returns true if cursor or cursor variable is open or not otherwise false.%FOUND - To check wheteher cursor is found or not. Returns true if fetch returns a row otherwise false.%NOTFOUND - To check whether ... Cursor for loop implicitly declares %ROWTYPE as loop index,opens a cursor, fetches rows of values from active set into fields in the record and closeswhen all the records have been processed. Latest Answer : Cursor for loop implicitly declares a loop index as %rowtype. It uses result of query to determine dynamically no of times the loop is to be repeated. It performs open, fectch , close operations implicitly. ...
Sponsored Links
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||