What are the return values of functions SQLCODE and SQLERRM ? What is Pragma EXECPTION_INIT ? Explain the usage ?

1 Answer

Answer :

SQLCODE returns the latest code of the error that has occurred.
SQLERRM returns the relevant error message of the SQLCODE.

Related questions

Description : What is a package ? What are the advantages of packages ? What is Pragma EXECPTION_INIT ? Explain the usage ?

Last Answer : The PRAGMA EXECPTION_INIT tells the complier to associate an exception with an oracle error. To get an error message of a specific oracle error. e.g. PRAGMA EXCEPTION_INIT (exception name, oracle error number)

Description : Explain the usage of WHERE CURRENT OF clause in cursors ?

Last Answer : WHERE CURRENT OF clause in an UPDATE,DELETE statement refers to the latest row fetched from a cursor. Database Triggers

Description : What are the usage of SAVEPOINTS ?value in a session before accessing next value ?

Last Answer : SAVEPOINTS are used to subdivide a transaction into smaller parts. It enables rolling back part of a transaction. Maximum of five save points are allowed.

Description : What is the usage of an ON-INSERT,ON-DELETE and ON-UPDATE TRIGGERS ? These triggers are execu

Last Answer : These triggers are executes when inserting, deleting and updating operations are performed and can be used to change the default function of insert, delete or update respectively. For Eg, instead of inserting a row in a table an existing row can be updated in the same table.

Description : Some of the situations where inline expansion may not work are: A) For functions returning values, if a loop, a switch or goto exists. B) If functions contain static variables and they are re-cursive. C) For functions not returning values, if return statement exist. D) All of the above.

Last Answer : D) All of the above.

Description : Explain the use of table functions.

Last Answer : Table functions are designed to return a set of rows through PL/SQL logic but are intended to be used as a normal table or view in a SQL statement. They are also used to pipeline information in an ETL process.

Description : Explain how procedures and functions are called in a PL/SQL block ?

Last Answer : Function is called as part of an expression. sal := calculate_sal ('a822'); procedure is called as a PL/SQL statement calculate_bonus ('A822');

Description : Is it possible to insert comments into sql statements return in the data model editor?

Last Answer : Yes

Description : What should be the return type for a cursor variable.Can we use a scalar data type as return type?

Last Answer : The return type for a cursor must be a record type.It can be declared explicitly as a user-defined or %ROWTYPE can be used. eg TYPE t_studentsref IS REF CURSOR RETURN students%ROWTYPE

Description : Where is a procedure return in an external pl/sql library executed at the client or at the server?

Last Answer : At the client.

Description : When the form is running in DEBUG mode, If you want to examine the values of global variables and other form variables, What package procedure command you would use in your trigger text ?

Last Answer : Break. SYSTEM VARIABLES

Description : What are the values that can be specified for OPTIMIZER_GOAL parameter of the ALTER SESSION Command ? )

Last Answer : CHOOSE,ALL_ROWS,FIRST_ROWS and RULE.

Description : What are the values that can be specified for OPTIMIZER MODE Parameter ?

Last Answer : COST and RULE.

Description : Can you pass values to-and-fro from foreign function ? how ?

Last Answer : Yes . You obtain a return value from a foreign function by assigning the return value to an Oracle Forms variable or item. Make sure that the Oracle Forms variable or item is the same data type as ... SQL data type; it must also be the appropriate parameter type as defined in the PL/SQL interface.

Description : Can the default values be assigned to actual parameters?

Last Answer : Yes

Description : What are the two ways by which data can be generated for a parameters list of values?

Last Answer : 1. Using static values. 2. Writing select statement.

Description : How can values be passed bet. precompiler exits & Oracle call interface?

Last Answer : By using the statement EXECIAFGET & EXECIAFPUT.

Description : What are the built-ins used for Getting cell values?

Last Answer : GET_GROUP_CHAR_CELL (function) GET_GROUPCELL(function) GET_GROUP_NUMBET_CELL(function)

Description : What are the built-in used for getting cell values?

Last Answer : Get_group_char_cell(function) Get_groupcell(function) Get_group_number_cell(function)

Description : CROSS VALIDATING VALUES

Last Answer : - For key flexfields with multiple segments, we can define rules to cross check value combinations entered with in the key flexfield segments. This option is referred as Cross Validation rules.

Description : A Column is having many repeated values which type of index you should create on this column, if you have to?

Last Answer : For example, assume there is a motor vehicle database with numerous low-cardinality columns such as car_color, car_make, car_model, and car_year. Each column contains less than 100 distinct values by themselves, and a b tree index would be fairly useless in a database of 20 million vehicles.

Description : What are Procedure,functions and Packages

Last Answer : Procedures and functions consist of set of PL/SQL statements that are grouped together as a unit to solve a specific problem or perform set of related tasks. Procedures do not ... Provide a method of encapsulating and storing related procedures, functions, variables and other Package Contents

Description : What are different modes of parameters used in functions and procedures?

Last Answer : IN -OUT -INOUT

Description : What is an UTL_FILE.What are different procedures and functions associated with it?

Last Answer : UTL_FILE is a package that adds the ability to read and write to operating system files. Procedures associated with it are FCLOSE, FCLOSE_ALL and 5 procedures to output data to a file PUT, ... , PUTF, FFLUSH.PUT, FFLUSH.PUT_LINE,FFLUSH.NEW_LINE. Functions associated with it are FOPEN, ISOPEN.

Description : What is difference between Procedures and Functions ?

Last Answer : A Function returns a value to the caller where as a Procedure does not.

Description : How packaged procedures and functions are called from the following?

Last Answer : a. Stored procedure or anonymous block b. an application program such a PRC *C, PRO* COBOL c. SQL *PLUS?? a. PACKAGE NAME.PROCEDURE NAME (parameters); variable := PACKAGE NAME.FUNCTION NAME ( ... .PROCEDURE if the procedures does not have any out/in-out parameters. A function can not be called.

Description : Name the tables where characteristics of Package, procedure and functions are stored ?

Last Answer : User_objects, User_Source and User_error.

Description : What are the built-ins used for finding object ID functions?

Last Answer : Find_group(function) Find_column(function)

Description : Name of the functions used to get/set canvas properties?

Last Answer : Get_view_property, Set_view_property

Description : What set of all values that a function will return as outputs is called the of the function?

Last Answer : Need answer

Description : How do I return the first 10 values that occur most frequently?

Last Answer : CREATE VIEW v1

Description : Can 2 functions have same name & input parameters but differ only by return datatype

Last Answer : No.

Description : What does the following expression means ? char *(*(* a[N]) ( )) ( ); (A) a pointer to a function returning array of n pointers to function returning character pointers. (B) a ... to characters (D) an array of n pointers to function returning pointers to functions returning pointers to characters.

Last Answer : Answer: A,B,C,D

Description : Find the maximum or minimum values of the following functions: (i)`x^(3)-2x^(2)+x+3` (ii)` x^(3)-6x^(2)+9x+4` (iii) `(x+1)(x-2)^(2)+1` (iv) `2x^(3)-9x

Last Answer : Find the maximum or minimum values of the following functions: (i)`x^(3)-2x^(2)+x+3` (ii)` x^(3)-6x^(2)+9x+4` ... 2)^(2)+1` (iv) `2x^(3)-9x^(2)+12x+1`

Description : Find the values of x for which the following functions are maximum or minimum: (i) ` x^(3)- 3x^(2) - 9x ` (ii) ` 4x^(3)-15x^(2)+12x+1` (iii) ` 1-x-x^(

Last Answer : Find the values of x for which the following functions are maximum or minimum: (i) ` x^(3)- 3x^(2) - 9x ` (ii) ` 4x ... (v) `(x^(2)-x+1)/(x^(2)+x+1)`

Description : What parent functions have a domain of all real values of x?

Last Answer : What is the answer ?

Description : FP-based estimation techniques require problem decomposition based on (A) information domain values (B) project schedule (C) software functions (D) process activities

Last Answer : (C) software functions

Description : Explain UNION,MINUS,UNION ALL, INTERSECT ?

Last Answer : INTERSECT returns all distinct rows selected by both queries.MINUS - returns all distinct rows selected by the first query but not by the second.UNION - returns all distinct rows selected by either queryUNION ALL - returns all rows selected by either query, including all duplicates.

Description : Explain what partitioning is and what its benefit is.

Last Answer : Partitioning is a method of taking large tables and indexes and splitting them into smaller, more manageable pieces.

Description : Explain materialized views and how they are used.

Last Answer : Materialized views are objects that are reduced sets of information that have been summarized, grouped, or aggregated from base tables. They are typically used in data warehouse or decision support systems.

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 use of setting GLOBAL_NAMES equal to TRUE.

Last Answer : Setting GLOBAL_NAMES dictates how you might connect to a database. This variable is either TRUE or FALSE and if it is set to TRUE it enforces database links to have the same name as the remote database to which they are linking.

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 an ORA-01555

Last Answer : You get this error when you get a snapshot too old within rollback. It can usually be solved by increasing the undo retention or increasing the size of rollbacks. You should also look at the logic involved in the application getting the error message.

Description : How would you go about generating an EXPLAIN plan?

Last Answer : Create a plan table with utlxplan.sql. Use the explain plan set statement_id = 'tst1' into plan_table for a SQL statement Look at the explain plan with utlxplp.sql or utlxpls.sql

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.