Posts

Showing posts from December, 2024

What is pragma exception_init in oracle sql plsql interview question and answer?

Image
pragma exception_init : It associates an exception name with oracle error number.ORA_error is handled by writing specific handler. Word pragma signifies or mean that it is compiler directive. Function SQLCODE is used to return the valid oracle error number.EXCEPTION_INT is used in the declarative part (before BEGIN keyword) of any PLSQL block, subprogram or package. Pragma must be appeared in the declaration section as it is associative exception which is used somewhere after the exception declaration. One exception name is assigned to the particular error number. It is allowed to handle the specific errors using the custom exception names. It is directive used to handle the user defined exception with a specific error number. It is useful for mapping oracle error codes like ORA-00942, ORA-01400 to user defined exceptions which enables more readable and structured error which is going to handle in the code. Error number in the future may arise conflict among the unrelated application u...

What is the difference between rank and dense rank function?

Image
 Introduction: They are used for ranking in the SQL. The main difference is that the rank may skip the numbers when the same values occur multiple times and consecutive numbers are not returned. For an example,5,6,6,8 & 9. Dense rank may not skip the numbers when the same values occur multiple times and consecutive numbers are returned. For an example,5,6,6,7,8&9. Suppose in the company database the employer has to fire 3000 employees out of 10000 employees. They will analyze the performance of all the employees i.e. 10000 employees. Using this concept, employer will shortlist the 3000 employees whose performance are not like 7000.It is easy for them to fire when it is the cutting time. Operational work which are going to complete in the long time will be going to finish within short time due to this concept. They are used to order and assign numerical values when the task lies or fall within the domain. Both are used with the over () clause. In the company, top performer s...

What are the advantage of packages in oracle sql plsql interview question and answer?

Image
 Advantages of packages in oracle pl sql It is more used in software engineering in oracle sql pl/sql development career. It provides the important features like reliablity,maintainability,resusablity of codes and used in the large and complex systems by using the group of team efforts. It will group the related procedure,function,variable and making the code which is easier to maintain and manage. Codes are reused in the multiple applications which reside in it reducing duplication and maintenance problems which occur in the future.  It is loaded into the memory as per the session. It avoids repetitive use and improve the speed of execution of the source codes. It supports the overloading with the multiple procedures or functions with the same name exist with different and various parameters. It acts like the code management in inventory management in which the several sub-programs have come under the single package for add and modify item. It is used instead of the standalon...

Explain oracle pl sql datatypes interview question and answer for fresher and experienced.

Image
 Oracle PLSQL Data Types : PLSQL constant,value,variable,parameter,function which return the value are having the data type. It will determine the storage space information occupied and occurred in the memory or storage format and range constraints for valid values and operations as per specified size limit. It will determine how the data will be going to stored, handled and treated by the oracle engine during the period of processing and storage. It is used in the PLSQL blocks. It allows you to define your sub-types. PLSQL codes are embedded into the java program. Subtypes are used to make the data types compatible with data types used in the PLSQL program while embedding the PLSQL code into the java program. Subtype will be compatible with ANSI/ISO & IBM. It provides the pre-defined data types. Pre-defined data types are categorized into the four types: Composite LOB Reference Scalar Scalar Datatypes: It stores the values without the internal components. It holds the single ...