What is difference between % ROWTYPE and TYPE RECORD ?

1 Answer

Answer :

% 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
different table or views and variables.
E.g. TYPE r_emp is RECORD (eno emp.empno% type,ename emp
ename %type );
e_rec emp% ROWTYPE
cursor c1 is select empno,deptno from emp;
e_rec c1 %ROWTYPE.

Related questions

Description : What are % TYPE and % ROWTYPE ? What are the advantages of using these over datatypes?

Last Answer : % 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 or columns selected in ... database definition of a column in a table changes, the data type of a variable changes accordingly.

Description : There is a % sign in one field of a column. What will be the query to find it?

Last Answer : '' Should be used before '%'.

Description : What are the different type of a record group?

Last Answer : Query record group Static record group Non query record group

Description : If the maximum record retrieved property of the query is set to 10 then a summary value will be calculated?

Last Answer : Only for 10 records.

Description : Use the add_group_column function to add a column to record group that was created at a design time?

Last Answer : False

Description : What is a Query Record Group?

Last Answer : A query record group is a record group that has an associated SELECT statement. The columns in a query record group derive their default names, data types, had lengths from the database columns ... rows retrieved by the query associated with that record group. What is a Non Query Record Group?

Description : How many number of columns a record group can have?

Last Answer : A record group can have an unlimited number of columns of type CHAR, LONG, NUMBER, or DATE provided that the total number of column does not exceed 64K.

Description : What is Current record attribute property?

Last Answer : Specifies the named visual attribute used when an item is part of the current record. Current Record Attribute is frequently used at the block level to display the current row in a multi-record ... current record, but you cannot dynamically highlight the current item, as the input focus changes.

Description : What are record groups ? * Can record groups created at run-time?

Last Answer : A record group is an internal Oracle Forms data structure that has a column/row framework similar to a database table. However, unlike database tables, record groups are separate objects that belong to ... you define its structure and row values at design time, and they remain fixed at runtime.

Description : Use the ADD_GROUP_ROW procedure to add a row to a static record group? I) TRUE II)FALSE

Last Answer : I) FALSE

Description : Use the ADD_GROUP_COLUMN function to add a column to a record group that was created at design time? I) TRUE II)FALSE

Last Answer : II) FALSE

Description : What is a record Group?

Last Answer : A record group is an internal oracle forms data structure that has a similar column/row frame work to a database table

Description : Give built-in routine related to a record groups?

Last Answer : Create_group (Function) Create_group_from_query(Function) Delete_group(Procedure) Add_group_column(Function) Add_group_row(Procedure) Delete_group_row(Procedure) Populate_group(Function) Populate_group_with_query(Function) Set_group_Char_cell(procedure)

Description : What is a record Group?

Last Answer : A record group is an internal oracle forms data structure that has a similar column/row frame work to a database table

Description : What is the use of RECORD option in EXP command?

Last Answer : For Incremental exports, the flag indirects whether a record will be stores data dictionary tables recording the export.

Description : What is the use of RECORD LENGTH option in EXP command ?

Last Answer : Record length in bytes.

Description : What is a record group?

Last Answer : A record group is an internal Oracle Forms that structure that has a column/row framework similar to a database table. However, unlike database tables, record groups are separate objects that belong to the form module which they are defined.

Description : What is a Static Record Group?

Last Answer : A static record group is not associated with a query, rather, you define its structure and row values at design time, and they remain fixed at runtime.

Description : Use the Add_group_row procedure to add a row to a static record group 1. true or false?

Last Answer : False

Description : What is WHEN-Database-record trigger?

Last Answer : Fires when oracle forms first marks a record as an insert or an update. The trigger fires as soon as oracle forms determines through validation that the record should be processed by the next post or ... the first item in the record, and after the operator attempts to navigate out of the item.

Description : What are the different types of Record Groups?

Last Answer : Query Record Groups NonQuery Record Groups State Record Groups

Description : What is the Maximum allowed length of Record group Column?

Last Answer : Record group column names cannot exceed 30 characters.

Description : If you update an assignment record multiple times in a single day, can you still track the record, if yes how?

Last Answer : For some objects, such as assignments, more than one update per day is maintained by creating a physical record for each update. Such objects include an effective sequence number in each physical record to show the order in which updates made to an object on a single day were applied.

Description : What are the primitive operations common to all record management systems?s?

Last Answer : Addition, deletion and modification.

Description : What is Record-at-a-time?

Last Answer : The Low level or Procedural DML can specify and retrieve each record from a set of records. This retrieve of a record is said to be Record-at-a-time.

Description : What is difference between CHAR and VARCHAR2 ? What is the maximum SIZE allowed for each type ?

Last Answer : CHAR pads blank spaces to the maximum length. VARCHAR2 does not pad blank spaces. For CHAR it is 255 and 2000 for VARCHAR2.

Description : Difference between SUBSTR and INSTR ?

Last Answer : INSTR (String1,String2(n,(m)),INSTR returns the position of the mth occurrence of the string 2 instring1. The search begins from nth position of string1.SUBSTR (String1 n,m)SUBSTR returns a character string of size m in string1, starting from nth position of string1.

Description : What is the difference between DBFile Sequential and Scattered Reads?(for DBA

Last Answer : Both "db file sequential read" and "db file scattered read" events signify time waited for I/O read requests to complete. Time is reported in 100's of a second for Oracle 8i releases and below, ... v_$system_event b where a.event = 'db file sequential read' and b.event = 'db file scattered read';

Description : What is the difference between static and dynamic lov

Last Answer : The static lov contains the predetermined values while the dynamic lov contains values that come at run time

Description : What is the difference between NAME_IN and COPY ?

Last Answer : Copy is package procedure and writes values into a field. Name in is a package function and returns the contents of the variable to which you apply.

Description : What is the difference between restoring and recovering? (for DBA

Last Answer : Restoring involves copying backup files from secondary storage (backup media) to disk. This can be done to replace damaged files or to copy/move a database to a new location. Recovery is the process ... as SYSDBA Sql> RECOVER DATABASE UNTIL TIME '2001-03-06:16:00:00' USING BACKUP CONTROLFILE;

Description : What is the difference between online and offline backups? (for DBA

Last Answer : A hot backup is a backup performed while the database is online and available for read/write. Except for Oracle exports, one can only do on- line backups when running in ARCHIVELOG mode. A cold backup is a backup performed while the database is off-line and unavailable to its users.

Description : What is the difference between the SQL*Loader and IMPORT utilities?

Last Answer : These two Oracle utilities are used for loading data into the database. The difference is that the import utility relies on the data being produced by another Oracle utility EXPORT while the SQL* ... from different data sources just so long as it conforms to ASCII formatted or delimited files.

Description : What is the difference between a TEMPORARY tablespace and a PERMANENT tablespace?

Last Answer : A temporary tablespace is used for temporary objects such as sort structures while permanent tablespaces are used to store those objects meant to be used as the true objects of the database.

Description : Explain the difference between a FUNCTION, PROCEDURE and PACKAGE.

Last Answer : A function and procedure are the same in that they are intended to be a collection of PL/SQL code that carries a single task. While a procedure does not have to return any ... functions and procedures that are grouped together based on their commonality to a business function or application.

Description : Explain the difference between $ORACLE_HOME and $ORACLE_BASE.

Last Answer : ORACLE_BASE is the root directory for oracle. ORACLE_HOME located beneath ORACLE_BASE is where the oracle products reside.

Description : Explain the difference between ARCHIVELOG mode and NOARCHIVELOG mode and the benefits and disadvantages to each.

Last Answer : ARCHIVELOG mode is a mode that you can put the database in for creating a backup of all transactions that have occurred in the database so that you can recover to any point in time. ... having to write transactions to an archive log and thus increases the performance of the database slightly.

Description : Explain the difference between a data block, an extent and a segment.

Last Answer : A data block is the smallest unit of logical storage for a database object. As objects grow they take chunks of additional storage that are composed of contiguous data blocks. These groupings ... that an object takes when grouped together are considered the segment of the database object.

Description : Explain the difference between a hot backup and a cold backup and the benefits associated with each.

Last Answer : A hot backup is basically taking a backup of the database while it is still up and running and it must be in archive log mode. A cold backup is taking a backup of the database while it is ... and thus there will be a slight performance gain as the database is not cutting archive logs to disk.

Description : What is the Difference between a post query and a pre query

Last Answer : A post query will fire for every row that is fetched but the pre query will fire only once.

Description : What is the difference between deleting and truncating of tables

Last Answer : Deleting a table will not remove the rows from the table but entry is there in the database dictionary and it can be retrieved But truncating a table deletes it completely and it cannot be retrieved.

Description : What is the difference between candidate key, unique key and primary key

Last Answer : Candidate keys are the columns in the table that could be the primary keys and the primary key is the key that has been selected to identify the rows. Unique key is also useful for identifying the distinct rows in the table.)

Description : What is difference between TRUNCATE & DELETE ?

Last Answer : TRUNCATE commits after deleting entire table i.e., can not be rolled back. Database triggers do not fire on TRUNCATEDELETE allows the filtered deletion. Deleted records can be rolled back or committed.Database triggers fire on DELETE.

Description : What is difference between UNIQUE and PRIMARY KEY constraints?

Last Answer : A table can have only one PRIMARY KEY whereas there can be any number of UNIQUE keys. The columns that compose PK are automatically define NOT NULL, whereas a column that compose a UNIQUE is not automatically defined to be mandatory must also specify the column is NOT NULL.

Description : Difference between database triggers and form triggers?

Last Answer : Data base trigger(DBT) fires when a DML operation is performed on a data base table. Form trigger(FT) Fires when user presses a key or navigates between fields on the screen -Can be row ... other database triggers to fire.Can cause other database triggers to fire, but not other form triggers.

Description : Difference between procedure and function.?

Last Answer : Functions are named PL/SQL blocks that return a value and can be called with arguments procedure a named block that can be called with parameter. A procedure all is a PL/SQL statement by itself, while a Function call is called as part of an expression.

Description : Difference between NO DATA FOUND and %NOTFOUND?

Last Answer : NO DATA FOUND is an exception raised only for the SELECT....INTO statements when the where clause of the querydoes not match any rows. When the where clause of the explicit cursor does not match any rows the %NOTFOUND attribute is set to TRUE instead.

Description : Difference between an implicit & an explicit cursor.?

Last Answer : only one row. However,queries that return more than one row you must declare an explicit cursor or use a cursor FOR loop. Explicit cursor is a cursor in which the cursor name is explicitly ... statements An implicit cursor is used to process INSERT, UPDATE, DELETE and single row SELECT. .INTO

Description : What is difference between Rename and Alias?

Last Answer : Rename is a permanent name given to a table or column whereas Alias is a temporary name given to a table or column which do not exist once the SQL statement is executed.

Description : What is difference between SQL and SQL*PLUS?

Last Answer : SQL*PLUS is a command line tool where as SQL and PL/SQL language interface and reporting tool. Its a command line tool that allows user to type SQL commands to be executed directly against an Oracle ... SQL*PLUS commands are used to format query result, Set options, Edit SQL commands and PL/SQL.