![]() |
| Home | Tech FAQ | Interview Questions | Placement Papers | Tech Articles | Learn | Freelance Projects | Online Testing | Geeks Talk | Job Postings | Knowledge Base | Site Search | Add/Ask Question |
![]() Related Questions A set of related declarations and procedural statements is called block. Latest Answer : Component of PL/SQL Block are Declare(Optional), Begin(Mandatory), Exception(Optional), END(Mandatory). ... 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 ... 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 ... WHERE CURRENT OF clause in an UPDATE,DELETE statement refers to the latest row fetched from a cursor. Database Triggers Latest Answer : When referencing the current row from an explicit cursor, use the WHERE CURRENT OF clause. This allows you to apply updates and deletes to the row currently being addressed, without the need to explicitly reference the ROWID. You must include the FOR ... Database trigger is stored PL/SQL program unit associated with a specific database table. Usages are Audit data modifications, Latest Answer : A database trigger is a named pl/sql block associated with a table and fires automatically when an event occurs or something happens. Data auditing , Implementing complex business rules, security are main uses of database triggers. ... Insert Update Latest Answer : A trigger may be a 1. DML Trigger on tables2. Instead of triggers on views3. System triggers on database or schemaBased on the way it executes statements triggers are of two types1. Statement leve trigger2. Row level triggerA trigger fires ... Is it possible to use Transaction control Statements such a ROLLBACK or COMMIT in Database Trigger ? Is it possible to use Transaction control Statements such a ROLLBACK or COMMIT in Database Trigger ? Why ? It is not possible. As triggers are defined for each table, if you use COMMIT of ROLLBACK in a trigger, it
Sponsored Links
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||