Performance Optimization Tips

Replace IN, NOT IN with Exists & Not Exists. Avoid using “Insert Into … Select …” statements as it can take lot time to execute if select query returns huge number of records. Instead user cursors. Avoid sub queries, instead use joins or subquery factoring (with clause) this will optimize the code. If insert &Continue reading “Performance Optimization Tips”

Coding Standards

All variable names should start with “v”. e.g., vKount Number; All stored procedure names should start with “SP_”.e.g., Create or Replace Procedure SP_HPC_Cashback(OutMsg Out VarChar2) is All stored function names should start with “SF_”.e.g., Create or Replace Procedure SF_CalcInt(Prin Number, Yr Number) return number is All package names should start with “PKG_”.e.g., CREATE PACKAGE PKG_DMR_ProcessingContinue reading “Coding Standards”

Test Your Knowledge 2

Test your knowledge by answering following questions. Note: Kindly use the below mentioned tables only from HR Schema. Don’t create your own tables. • COUNTRIES • DEPARTMENTS • EMPLOYEES • JOBS • JOB_HISTORY • LOCATIONS • REGIONS Write a query in SQL to display the first name, last name, department number, and department name forContinue reading “Test Your Knowledge 2”