You are on page 1of 20

ORACLE QUESTION BANK AND ANSWERS 1. What is RDBMS? What are different database models?

RDBMS : Relational Database Management System. In RDBMS the data is stored in the form of tables i.e. rows & columns. The different database models are 1. HDBMS = Hierarchical Database Management system. 2. NDBMs = Network Database Management System. 3. RDBMS = Relational Database Management System.
2. What is SQL?

SQL stands for Structured Query Language. SQL was derived from the Greek word called "SEQUEL". SQL is a non- procedural language that is written in simple English.
3. What is a transaction?

Transaction is a piece of logical unit of work done between two successive commits or commit and Rollback.
4. What is a commit ?

Commit is a transaction statement that make the changes permanent into the database.
5. What is a Rollback?

Rollback is a transaction statement that undoes all changes to a savepoint or since the beginning of the transaction.
6. What is DDL?

DDL - Data Definition Language. It is a set of statements that is used to define or alter the user_defined objects like tables, views, procedures, functions etc., present in a tablespace.
7. What is DML?

DML - Data Manipulation Language. It is a set of statements that is used for manipulation of data. Eg:-. Inserting a row into a table, delete a row from a table etc.
8. What is Locking?

The mechanism followed by the SQL to control concurrent operations on a table is called locking.
9. What is a Dead lock?

When two users attempt to perform actions that interfere with one another, this situation is defined as Deadlock. Eg:- If two users try to change both a foreign and its parent key value at the same time.
10. What is a Shared Lock?

The type of lock that permits other users to perform a query, but could not manipulate it, i.e. cannot perform any modification or insert or delete a data.
11. What is Exclusive Lock ?

The type of lock that permits users to query data but not change it and does not permits another user to have any type of lock on the same data. They are in effect until the end of the

transaction.
12. What is Share Row-Exclusive lock ?

Share Row Exclusive locks are used to look at a whole table and to allow others to look at rows in the table but to prohibit others from locking the table in Share mode or updating rows.
13. What are Group - Functions ?

The Functions that are used to get summary information about group or set of rows in a table. The group functions are also termed as aggregate functions. Following are the examples of aggregate functions : 1. AVG() - To find the average value 2. MIN() - To find the minimum value of the set of rows. 3. MAX() - To find the maximum value of the set of rows. 4. COUNT() - To find the total no of rows that has values. 5. SUM() - To find the summation of the data of a given column.
14. What is indexing ?

An index is an ordered list of the contents of a column or a group of columns of a table. By indexing a table, it reduces the time in performing queries, especially if the table is large.
15. What are clusters?

A Cluster is a schema object that contains one or more tables that have one or more columns in common. Rows of one or more tables that share the same value in these common columns are physically stored together within the database.
16. What is a View?

View is like a window through which you can view or change the information in table. A view is also termed as a 'virtual table'.
17. What is a Rowid?

For each row in the database, The ROWID pseudocolumn returns a row's address. ROWID values contain information necessary to locate a row: * which datablock in the data file * which row in the datablock (first row is 0) * which data file (first file is 1) Values of the Rowid pseudocolum have the datatype ROWID.
18. What is a PRIMARY KEY ? PRIMARY KEY CONSTRAINT:

1. Identified the columns or set of columns which uniquely identify each row of a table and ensures that no duplicate rows exist in the table. 2. Implicitly creates a unique index for the column(S) and specifies the column(s) as being NOT NULL. 3. The name of the index is the same as the constraint name. 4. Limited to one per table.
Eg:CREATE TABLE loans( account NUMBER(6), loan_number NUMBER(6), ...... CONSTRAINT loan_pk PRIMARY KEY

(account, loan_number)); 19. What is a Unique constraint? UNIQUE CONSTRAINT :

1. Ensures that no two rows of a table have duplicate values in the specified columns(s). 2. Implicitly creates a unique index on the specified columns. 3. Index name is the given constraint name.
Eg:CREATE TABLE loans( loan_number NUMBER(6) NOT NULL UNIQUE ); 20. What is the difference between a unique and primary key?

The Primary key constraint is a constraint that takes care maintaining the uniqueness of the data, enforcing the not null characteristic, creates a self-index. The Unique key constraint maintains only the uniqueness of the data and does not enforce the not null characteristic to the data column.
21. What is a foreign key ? FOREIGN KEY CONSTRAINT :

1. Enforces referential integrity constraint which requires that for each row of a table, the value in the foreign key matches a value in the primary key or is null. 2. No limit to the number of foreign keys. 3. Can be in the same table as referenced primary key. 4. Can not reference a remote table or synonym.
Eg :1. Explicit reference to a PRIMARY KEY column CREATE TABLE accounts( account NUMBER(10) , CONSTRAINT borrower FOREIGN KEY (account) REFERENCES customer(account)); 2. Implicit reference to a PRIMARY KEY column CREATE TABLE accounts( account NUMBER(10), CONSTRAINT borrower FOREIGN KEY (account) REFERENCES customer); 22. What is data integrity ? what are the types of integrity?

1. A mechanism used by the RDBMS to prevent invalid data entry into the base tables of the database. 2. Defined on tables so conditions remain true regardless of method of data entry or type of transactions.
The following are the type of integrity

* Entity integrity * Referential Integrity

* General Business rules


23. What is a Referential Integrity ?

Enforces master/detail relationship between tables based on keys. * Foreign key * Update Delete restrict action * Delete Cascade action
24. What are different datatypes?

The following are the different datatypes available in Oracle 1. Internal Datatypes 2. Composite Datatypes
Internal Datatypes 1. Character Datatype 2. Date Datatype 3. Raw and Long Raw datatypes 4. Rowid Datatype Composite Datatypes 1. Table Datatype 2. Record Datatype 25. What is VARCHAR2? How is it different from CHAR?

The Varchar2 datatype specifies a variable length character string. When you create a varchar2 column, you can supply the maximum number of bytes of data that it can hold. Oracle Subsequently stores each values in the column exactly as you specify. If you try to insert a value that exceeds this length, Oracle returns an error. The Char datatype length is 1byte. The maximum size of the Char datatype is 255. Oracle compares Char values using the blank-padded comparison semantics. If you insert a value that is shorter than the column length, Oracle blank-pads the value to the column length.
26. What is datatype mixing?

27. What is NULL?

A data field without any value in it is called a null value. A Null can arise in the following situation Where a value is unknown. Where a value is not meaningful.
28. What is a sequence?

A sequence is a database object from which multiple users may generate unique integers.
29. What are pseudo-columns in ORACLE?

The columns that are not part of the table are called as pseudocolumns

30. What is Like operator? How is it different from IN operator?

The type of operator that is used in character string comparisons with pattern matching. Like operator is used to match a portion of the one character string to another whereas IN operator performs equality condition between two strings.
31. What are Single Row number Functions?

The type of function that will return value after every row is being processed. Following are some of the row number functions.
Function Name 1. ABS(n) 2. Floor(n) 3. Mod(m,n) 4. power(m,n) 5. round(n) 6. sqrt(x) 7. trunc(n,m) Purpose Returns the absolute value of a number Returns the largest integer value equal or less than n. Returns the remainder of m divided by n. Returns m raised to the n power. Returns n rounded to m places right of a decimal point. returns the sqrt value of x. Returns n truncated to m decimal places.

32. What are single row character functions?

The function that process a value of data which is of character datatype and returns a character datatype after every row is being processed are termed as single row character functions.
Function Name 1. Chr(n) 2. initcap(n) 3. lower(n) Purpose Returns the character having an ascii value. Returns character with first letter of each argument in UPPERCASE. Returns characters with all the letters forced to lower case. Removes the spaces towards the left of the string.

4. ltrim(n) 33. What are Conversion Functions?

The functions used to convert a value from one datatype to another are being termed as conversion functions.

Function Name To_char(n,(fmt)) To_number(n) rowidtochar(n)

Purpose Converts a value of number datatype to a value of character datatype. Converts a character value into a number. Converts rowid values to character datatype. the result of this conversion is always 18 character long.

34. What are Date functions?

Functions that operate on Oracle Dates are termed as Date functions. All date functions return a value of date datatype except the function months_between returns a numeric value.
Function ADD_MONTHS(d,n) Purpose Returns the date 'd' plus n months. n must be an integer. n can be positive or negative. Returns the date of the last day of the month containing the date 'd'. Returns date of first day of week named after char that is later than d, char must be a valid day of the week. returns no of months between dates d & e.

LAST_DAY(d) NEXT_DAY(d,char)

MONTHS_BETWEEN(d,e)

35. What is NEW_TIME function? SYNTAX : new_time(d,a,b)

New_time function returns date and time in a time zone b and time in time zone . a and b are character expressions. Following are the some of the character expressions:
Character expression AST BST,BDT GMT PST,PDT YST,YDT 36. What is Convert function? Description Atlantic Stand or daylight time Berning stand or daylight time Greenwich Mean time. Pacific standard time. Yukon standard or daylight time.

Convert function converts two different implementations of the same character set . For instance: from DEC 8 bit multi-lingual characters to HP 8 bit multi-lingual character set.

Following are the character sets


US7ASCII WE8DEC WE8HP F7DEC - US7bit Ascii character set - Western European 8 bit Ascii set - HP's Western European 8 bit Ascii set - DEC's French 7-bit Ascii set

convert(char [destination],[source])
37. What is a translate function?

The function that returns a character after replacing all occurrences of the character specified with the corresponding character is called as translate function.
Eg:- TRANSLATE('Hello','l','L') 38. What is a soundex function?

Soundex is a functions that returns a character string representing the sound of the words in char. This function returns a phonetic representation of each word and allows you to compare words that are spelled differently but sound alike.
Eg:- soundex(char); 39. What is a replace function?

Replace function returns character with every occurrence of the search string replaced with the replacement string. If the replacement string is not supplied, all occurrences of search_string are being removed. Replace allows you to substitute one string from another.
40. What is a Floor function?

Floor Function returns the largest integer equal to or than n


Eg:- floor(n); 41. What is INITCAP Function?

The initcap function returns char,with first letter of each word in uppercase, all other letters in lowercase. A word is delimited by white space
42. What is ASCII Function?

The Ascii function returns the collating sequence of the first character of l char. There is no corresponding EBCDIC function. On EBCDIC systems, the ASCII function will return EBCDIC collating sequence values.
43. What is a Decode Function?

The Decode function is used to compare an expression to each search value and returns the result if expr equals the search value.
Eg:- Decode(expr,search1,result1,[search2,result2],[default]); 44. What is Greatest Function?

The Greatest function returns the greatest of a list of values. All expr after the first are converted to the datatype of the first before comparison is done.
45. What are Format models?

Format models are used to affect how column values are displayed when a format retrieved with a select command. Format models do not affect the actual internal representation of the

column.
46. Give 5 examples for DATE, Number function

Examples for Number Function: 1. Select abs(-15) "Absolute:" from dual 2. Select mod(7,5) "Modula" from dual 3. Select round(1235.85,1) from dual 4. Select power(2,3) from dual 5. Select floor(7.5) "Floor" from dual Examples for Date Function
1. Select sysdate from dual

2. Select sysdate-to_date(23-Sep-93) from dual 3. Select sysdate + 90 from dual 4. Select sysdate -90 from dual 5. Select next_day(sysdate,"Friday") from dual
47. What is an expression?

An expression is a group of value and operators which may be evaluated a single values.
48. What are the types of expression?

The different types of expressions are 1. Logical expression 2. Compound expression 3. Arithmetic expression 4. Negating expression.
49. What is a synonym?

The synonym is a user defined object that is used to define an alias name for the user defined objects like table, view etc.
50. What is a condition?

A Condition could be said to be of the logical datatype that evaluates the expression to a True or False value.
51. What are the 7 forms of condition?

There are totally 7 forms of condition 1. A comparison with expression or subquery results. 2. A comparison with any or all members in a list or a subquery 3. A test for membership in a list or a subquery 4. A test for inclusion in a range 5. A test for nulls. 6. A test for existence of rows in a subquery 7. A test involving pattern matching 8. A combination of other conditions
51. What are cursors?

Oracle uses work areas called private SQL areas to execute SQL statements and store processing information. This private SQL work area are known as cursors.
52. What are explicit cursors?

Cursors that are defined for performing a multiple row select are known as explicit cursors. Implicit cursors are the type of cursors that is implicitly opened by the Oracle itself whenever you perform any DML statements like update, delete, insert or select into statements.
53. What is a PL/SQL?

PL/SQL is a transaction processing language that offers procedural solutions.


54.What is an embedded SQL?

All the SQL statements written in a Host language are known as Embedded SQL statements.
55. What are the different conditional constructs of PL/SQL?

The statements that are useful to have a control over the set of the statements being executed as a single unit are called as conditional constructs. The following are the different type of conditional constructs of PL/SQL
1. if <condition> then elsif<condition> then end if 2. While <condition> loop end loop 3. loop exit when<conditon> end loop 4. for <var> in range1..range2 loop end loop 5. for i in <query/cursor identifier> loop end loop 56. How is an array defined in Pl/SQl?

Typedef <identifier> table of <datatype> index by binary_integer;


57. How to define a variable in PL/SQL?

Variable name datatype<size> <not null> <:= value>


58. How to define a cursor in PL/SQL?

Cursor variable is <query>


59. What are exceptions?

The block where the statements are being defined to handle internally and user-defined

PL/SQL errors.
60. What are the systems exceptions?

When an Oracle error is internally encountered PL/SQL block raises an error by itself. Such errors are called as internal or system defined exception. Following are some of the internal exceptions: 1. Zero_divide, 2. No_data_found 3. Value_error 4. Too_many_rows
61.How to define our own exceptions in PL/SQL?

Define a PL/SQL variable as an exception in the variable declaration section. In order to invoke the variable that is an exception type use the raise statement.
declare a exception; begin statements.... ----if x > y then raise a; end if; exception when a then statements, rollback; when others then commit; end; 62. How is the performance of Oracle improved by PL/SQL in Oracle?

Without PL/SQL the ORACLE RDBMS must process SQL statements one at a time, Each SQL statement results in another call to RDBMS and higher performance overhead. This overhead can be significant when you are issuing many statement in a network environment. With the PL/SQL all the SQL statements can be sent to RDBMS at one time. This reduces the I/O operations. With PL/SQL a tool like Forms can do all data calculations quickly and efficiently without calling on the RDBMS .
63. What is SCHEMA?

A SCHEMA is a logical collections of related items of tables and views.


64. What are profiles ?

A Profile is a file that contains information about the areas that a user can access .
65. What are roles?

A role is a collection of related privileges that an administrator can grant collectively to database users.
66. How can we alter a user's password in ORACLE?

In order to Alter the password of the user we have to use the following statement :
ALTER USER user_name identified by passwd Eg:- Alter user sam identified by paul

67. What is a tablespace in Oracle?

A tablespace is a partition or logical area of storage in a database that directly corresponds to one or more physical data files.
68. What is an extent?

An extent is nothing more that a number of contiguous blocks that ORACLE-7 allocates for an object when more space is necessary for the objects data.
69. What are PCTFREE and PCTUSED parameters?

PCTFREE:- PCTFREE controls how much of the space in a block is reserved for statements that update existing rows in the object. PCTUSED:- PCTUSED is a percentage of used space in a block that triggers the database to return to the table's free space list.
70. What is a block in Oracle?

The Place where the data related to Oracle are stored physically in an Operating System is known as Block.
71. What is a Client-server architecture?

A client/server system has three distinct components focusing on a specific job; a database server a client application and a network. A server ( or back end ) focuses on efficiently managing its resource such as database information. The server's primary job is to manage its resource optimally among multiple clients that concurrently request the server for the same resource. Database servers concentrate on tasks such as * Managing a single database of information among many concurrent users. * Controlling database access and other security requirements. * Protecting database information with backup and recovery features. * Centrally enforce global data integrity rules across all client applications. A client application ("the front end") is the part of the system that users employ to interact with data. The client applications in a client/server database system focus on jobs such as * Presenting an interface a user can interact with to accomplish work. * Managing presentation logic such as popup lists on a dataentry form or bargraphs in a graphical data presentation tool. * Performing application logic, such as calculating fields in a dataentry form. * Validating data entry. * Requesting and receiving information from a database server. A network and communication software are the vehicles that transmit data between the clients and the server in a system. Both the clients and the server run communication software that allows them to talk across a network. Types of Client Server Architecture :

1. Dedicated Client Server Architecture 2. Multi-threaded Client Server Architecture 3. Single- Task Client Server Architecture Dedicated Server : Connects the Client Directly to the dedicated server

Multi-Threaded Server : It is a type of architecture that is a combination of dispatcher, listener and front-end server process to serve the requests of many clients with minimal process overhead on the database server. Single-Task server : In host-based database server system a user employs a dumb terminal or terminal emulator to establish a session on the host computer and run the client database application.
72. What is a segment in Oracle? Explain the different types?

The place where the data are stored in the allotted tablespace are called as segments. The data may be a table or index data required by DBMS to operate. Segments are the next logical level of a storage tablespace. There are basically 5 types of segments Data segment : Contains all the data of each table

Index segment : Contains all the index data for one or more indexes created for a table. Rollback segment : Contains the recorded actions which should be undone under certain circumstances like Transaction rollback, Read consistency Temporary segment : Whenever a processing occurs Oracle often requires temporary work space for intermediate stages of statement processing. These area are known as temporary segments. Bootstrap segment : Contains information of the data dictionary definition for the tables to be loaded whenever a databases opened.

73. What is the use of Rollback segment?

It is a portion of a database that records the information about the actions that should be undone under certain circumstances like Transaction Rollback & Read consistency .
74. What is read-consistency in Oracle?

Read consistency in Oracle is a process that ignores the changes by others in a table whenever a table is queried. Read consistency in Oracle is achieved by a statement SET RANSACTION READ ONLY
75. What is SGA? SGA is System Global Area.

The library cache and dictionary cache makes up the shared pool. The shared pool combined with buffer-cache make up the System Global Area. Library Cache:- It stores the SQL Statements and PL/SQL Procedures. Dictionary Cache:- Holds dictionary information in memory.

Buffer and Cache:- the place where the data related to recently requested transaction is stored.
76. What are Back Ground Process?

The Process of server is being classified into two processes namely Foreground and Background. Foreground handles the request from client processes while Back-Ground handle other specific row of the database server like writing data to data and transaction Log Files.
77. System Userid-

Whenever You create a database an userid is automatically created related with database administration connections. This account/userid is called System Userid.
78. SYS Userid:-

It is a special account through which DBS can execute special database administration connections. SYS is the owner of database's data dictionary table.
79. Data Dictionary:-

It provides the details on the database objects such as columns, views etc., the oracle users, the privileges and the rights of users over different objects.
80. SQL*DBA:-

SQL*DBA is a utility through which you can manage a database system effectively.
81. ORACLE ADMINISTRATOR:-

The person who takes care of monitoring the entire performances of the database system is called as an Oracle Administrator. Oracle Administrator is the main person who takes care of assigning the set of to act as DBA for monitoring certain jobs like 1. Creating primary database storage structure. 2. Monitoring database performance and efficiency. 3. Backing up and restoring. 4. Manipulating the physical location of the database. TO CREATE DATABASE:Determining appropriate values for the file limit parameters of the create database command. Parameters Max data files:- Determines the maximum number of datafiles that can ever be allocated for the database Max Log Files:- Determines the maximum number of log groups for the database. Max Log Members:- Maximum number of members for each log group.
82. What are database files?

The physical files of Oracle are known as database files.


83. What is a Log File ?

The files that contains information about the information of recovery of oracle database at the event of a SYSTEM CRASH or a MEDIA Failure.

84. What is an init file?

Init files are known as Initialisation Parameter files. Init files are used for setting the parameters for an Oracle instance for Log files
85. What is a control file ? What is its significance?

A control is a small binary file. It contains all the system executable code named as ORACLE.DCF. A control file always consists of the following 1: Name of the database 2: Log files 3: Database creation
86. What does an UPDATE statement do?

To update rows in a table.


87. What does an Delete statement do?

To remove the rows from the table.


88. What does an insert statement do?

To insert new rows into a database .


89. What does an Select statement do?

To query data from tables in a database


90. How to create a table using select and insert statements?

Using Select statement: Create table tablename as <Query > Using insert statement we cannot create a table but can only append the data into the table Using Insert statement: Insert into tablename <Query>
91. How to delete duplicate rows in a table?

delete from tablename where rowid not in (select min(rowid) from tablename group by column1,column2,...)
92. What is an instance?

An Oracle instance is a mechanism that provides the mechanism for processing and controlling the database.

93. What is startup and shutdown?

Startup is a process making the Oracle Database to be accessed by all the users There are three phases to database startup 1. Start a new instance for the database 2. Mount the database to the instance 3. Opening the mounted database Shutdown is a process making the Oracle Database unavailable for all the users. There are three phases to database shutdown 1. Close database 2. Dismount the database from the instance 3. Terminate the instance.
94. What is mounting of database?

95. What is a two-phase commit?

96. What are snap-shots?

A Snap-shot is a table that contains the results of query of one or more tables or views, often located on a remote database.
97. What are triggers and stored Procedures?

A procedure is a group of PL/SQL statement that you call by a name. Compiled version of procedure that is stored in a database are known as Stored Procedures. A database trigger is a stored procedure that is associated with a table. Oracle automatically fires or executes when a triggering statement is issued.
98. What are Packages?

A package is an encapsulated collection of related program objects stored together in the database.
99. What is SQL*Forms? Is it a Client or a server?

Sql*Forms is a general purpose tool for developing and executing forms based interactive applications. The component of this tool is specially designed for application developers and programmers and it is used for the following tasks : define transactions that combine data from multiple tables into a single form. customize all aspects of an application definition using std-fill-in- interface to enhance the productivity and reduce learning time. Sql*Forms is a Client.

100. What are Packaged Procedures ?

A packaged procedure is a built in PL/SQL procedure that is available in all forms. Using packaged procedure we can build triggers to perform the following tasks to reduce the amount of repetitive data entry. control the flow of application ensuring the operators always follow sequence of actions when they use a form.
101. What are different type of triggers?

The following are the different type of triggers they are:1. Key-triggers 2. Navigational Triggers. 3. Transactional Triggers. 4. Query-based Triggers 5. Validation Triggers 6. Message - Error handling Triggers.
102. What is the difference between the Restricted and Un-Restricted Packaged Procedure?

Any packaged procedure that does not interfere with the basic function of SQL*Forms is an unrestricted packaged procedure. The un-restricted packaged procedure can be used in all types of triggers. Any packaged procedure that affects basic SQL*FORMS function is a restricted packaged procedure. Restricted packaged procedure can be used only in key-triggers and user-named triggers.
103. What is a system variables?

A System variable is a SQL*Forms variable that keeps track of some internal process of SQL*Forms in state. The system variable helps us to control the way an application behaves. SQL*Forms maintains the value of a system on a performance basis. That is the values of all the system variables corresponds only to the current form.
104. What are Global Variables?

A Global variable is a SQL*Form variable that is active in any trigger within a form and is active throughout SQL*Form(Run-Form) session. The variable stores a string value upto 255 characters.
105. What are the different types of objects in SQL*Forms?

A SQL*Form application is made up of objects. These objects contain all the information that is needed and produce the SQL*Forms application. Following are the objects of the SQL*Forms: 1. Form 2. Block 3. Fields 4. Pages 5. Triggers

6. Form-Level-Procedures.

106. What are Pages?

Pages are collection of display information such as constant text and graphics All fields are displayed in a page.
107. What is a Block and its types? Explain the different types of blocks?

Block is an object of Forms that describes section of a form or a subsection of a Form and serve as the basis of default database interface. Types of Blocks 1. Control Block : Control block is not associated with any table in the database. It is made up of fields that are base table fields, such as temporary data fields. 2. Detail Block : Detail Block is associated with a master block in master-detail relationship. The detail block displays detail records associated with master records in a block. 3. Master-Block : A master block is associated with a master-detail relationship. The master block display master records associated with detail records in the detail block. 4. Multi-record Block : A multi-record block can display more than one record at a time. 5. Non-enterable Block : A non-enterable block consists of all non-enterable fields. 6. Single-record Block : A single record block can display only one record at a time.
108. What is a Screen Painter?

This is a SQL Forms "work area" where you can modify the layout of forms. The screen painter displays one page area at a time.
109. What are the different field types?

The different types of fields in SQL*Forms are 1.Base - table field 2. Control-field 3. Enterable-field 4. Hidden-field 5. Look-up field 6. non-enterable field 7. scrolled - field
110.What is page Zero?

The place where the hidden fields are being placed in an application
111. What does Message procedure do?

The Message procedure displays specified text on the message line.


112. What does Name_in function do?

The Name_in packaged function returns the contents of the variable to which you apply it. The returned value is in form of a string.

113. What does CLEAR_EOL procedure do?

Clear_Eol clears the current field's value from the current cursor position to the end of the line or field.
114. What does On-Error trigger do?

The On-error trigger fires whenever SQL*Forms would normally cause an error message to display. The actions of an On-Error triggers is used for the following purposes: Trap and recover an error. replace a standard error message with a customized messages.

115. What does copy procedure do?

The Copy procedure writes a value into a field. Copy exists specifically to write a value into that is referenced through NAME_IN packaged function.
116. What is the Array size parameter?

The Array-Size parameter is a block-characteristic that specifies the maximum number of records that SQL Forms (Run-Form) can fetch from the database at one time.
117. What does Go_Block packaged procedure do?

The Go_Block packaged procedure navigates to the indicated Block. If the target is non-enterable an error occurs.
118. What does ANCHOR_VIEW procedure do?

Anchor_view moves a view of a page to a new location on the screen. This procedure effectively changes where on the screen the operator sees the view.
119. How to call a form from inside a form?

In order to call a form from inside a form we have to use the CALL packaged-procedure.
Syntax : CALL(Formname).

When call runs an indicated form while keeping the parent form active. SQL*Forms runs the called form with the same SQL*Forms options as the parent form.
120. How to send parameters to another form?

In order to send parameters across the forms we use the global variables.
121. How to give automatic hint text for fields?

In order to give automatic hint text for fields, In the field definition screen of the fields we are having an option called Hint value. In order to activate this option in the Select attribute section invoke the option called Automatic Hint.
122. How to see key map sequences?

In order to see key map sequences we have to press the SHOW KEY screen key function.
123. What is SYNCHRONIZE procedure does?

The synchronize procedure synchronizes the terminal screen with the internal state of form, that is synchronize updates the screen display to reflect the information that SQL*Forms has in its internal representation of the screen.
124. What is EXECUTE_QUERY procedure ?

The Execute_query procedure flushes the current block, opens a query and fetches a number

of selected records. If there are changes to commit, SQL*Forms prompts the operator to commit them during the execute query event.
125. How to customize system message in SQL*Forms?

Inorder to customise the system messages the On-Message trigger is used.


126. How to define the fields in WYSIWYG Format? What you see is what you get 127. What is an On-Insert trigger? How is it different from Pre-insert trigger?

An On-insert trigger replaces the default SQL*Forms processing for handling inserted records during transaction posting. It fires once for each row that is marked for insertion into the database. An On-insert Trigger fires during the Post and Commit Transactions event. Specifically it fires after the Pre-insert trigger and before the Post-insert trigger.
128. What is the difference between a Trigger and a Procedure?

Procedures can take in arguments where as Triggers cannot take in arguments.


129. How to Call a stored procedure from inside a form?

To call a Stored Procedure inside a form Trigger Text : Procedure name<paramaters>


130. What are V2 Triggers?

V2 Triggers are the types of Triggers in which we can perform only a simple query. And we cannot write a PL/SQL block.
131. How to rename a Form?

To rename a form select the rename option in the Action Menu. Then give the form name. Press Accept. In the next field give the new name. Press Accept to Execute.
132. What is a Pop -up page? How to define one? Pop-Up Pages:-

Pop-Up page is a SQL*Forms object which overlays on an area of the current displayed page in response to some event or for user call. To define a Pop-Up page use the page definition form which is in the Image-Modify option. In that form put a X in the Pop-Up field to make the current page as Pop-Up.
133. What is a Group in SQL * REPORTWRITER?

Group in ReportWriter:Group is a collection of fields, or single field. Usually by default a group will bare the field which are references by a single query. But we can change from single query group multi groups.
134. How do you define a Parent-child relationship in Reportwriter?

Parent - Child Relation:-

To define a Parent-Child relationship first we need more that one query. We should first enter the Parent Query and then the Child Query. In the Child Query Form we should give the Parent Query Name in the desired position and the common columns in both queries.
135. What is a Rowcount function in ReportWriter?

It is a field level function that is used for generation of automatic row numbers related to database column that does not have null values.
136. How do you define a matrix report?

Matrix Report:Matrix Report is a Report that consists of Two Parent Queries and one Child Query. Procedure for Defining a Matrix Report : 1. Define Two Parent Queries. 2. Define a Child Query. In the Definition screen specific which column of the child is to be related to the Query1 and to Query2. 3. After defining the queries in the Query option, In the Group option Place All the Groups in the option called Matrix Group Define the Print Direction for Query1 as Down Define the Print Direction for Query2 as Across Define the Print Direction for Child Query as Cross tab
137. How do you execute a report from within a form ?

Use the following command to run a report from the FORM. host('runrep <rep_name> term=<terminal_type> userid=<userid/passwd>);
138. What are exp and imp utilities?

Export & Import:Export utility is to write data from database to operating system files called Export Files. Exports does this by changing the data and table structures in to ASCII or EBCDIC codes. Import is a utility with which we can write the data from Export file to database. Export files can be only read by Import.

You might also like