Senior Plsql Developer

40+ Senior Plsql Developer Interview Questions and Answers

Updated 11 Jul 2025
search-icon

Asked in Deloitte

4d ago

Q. Did you ever work on query tuning and optimization? What do you see in explain plan?

Ans.

Yes, I have worked on query tuning and optimization. Explain plan helps in identifying the execution plan of a query.

  • I have experience in identifying and resolving performance issues in SQL queries.

  • I use explain plan to analyze the query execution plan and identify any bottlenecks.

  • I look for factors like full table scans, index usage, and join methods to optimize the query.

  • I also use tools like SQL Trace and TKPROF to identify performance issues.

  • For example, I optimized a que...read more

Asked in LTIMindtree

3d ago

Q. How can I write an anonymous block to add a column to a table that throws a user-friendly error if the column already exists, instead of the generic Oracle error?

Ans.

Use an anonymous PL/SQL block to check for column existence before adding it to a table.

  • Use a SELECT statement on USER_TAB_COLUMNS to check if the column exists.

  • If the column exists, raise a user-friendly exception.

  • If it doesn't exist, use EXECUTE IMMEDIATE to add the column.

Q. How do you write a package? What is the syntax for creating a package, and what are some common elements inside a package?

Ans.

A package is a collection of related functions, procedures, and other program objects.

  • Syntax: CREATE [OR REPLACE] PACKAGE package_name AS

  • Package can contain variables, constants, cursors, exceptions, types, subprograms.

  • Syntax: CREATE [OR REPLACE] PACKAGE BODY package_name AS

  • Package body contains the implementation of the subprograms declared in the package specification.

2d ago

Q. Difference between PK & UK. How many Nulls are allowed for UK

Ans.

PK is Primary Key and UK is Unique Key. PK does not allow nulls while UK allows only one null value.

  • PK is used to uniquely identify each record in a table, while UK ensures that all values in a column are unique.

  • PK does not allow duplicate values, while UK allows duplicate values except for one null value.

  • Example: If a table has a PK on column 'ID', each record must have a unique ID value. If a table has a UK on column 'Email', all email values must be unique except for one n...read more

Are these interview questions helpful?

Asked in Deloitte

2d ago

Q. How do you debug a procedure that has a nested procedure in it?

Ans.

Debugging a procedure with nested procedure.

  • Use DBMS_OUTPUT.PUT_LINE to print debug information

  • Use EXCEPTION block to catch and handle errors

  • Use SQL Developer Debugger to step through the code

  • Check the input and output parameters of the nested procedure

  • Use logging framework to log debug information

Asked in LTIMindtree

1d ago

Q. What are inner join, left join, and right join in SQL?

Ans.

Inner join returns matching rows, left join returns all from left, right join returns all from right table.

  • Inner Join: Combines rows from both tables where there is a match. Example: SELECT * FROM A INNER JOIN B ON A.id = B.id;

  • Left Join: Returns all rows from the left table and matched rows from the right. Example: SELECT * FROM A LEFT JOIN B ON A.id = B.id;

  • Right Join: Returns all rows from the right table and matched rows from the left. Example: SELECT * FROM A RIGHT JOIN B ...read more

Senior Plsql Developer Jobs

Extendo Technologies logo
Senior Pl Sql Developer 6-11 years
Extendo Technologies
3.9
Madurai
Marlabs Software Pvt. Ltd. logo
Senior PL/SQL Developer 4-8 years
Marlabs Software Pvt. Ltd.
3.4
Bangalore / Bengaluru
Creditsafe Technology logo
Sr.PL/SQL Developer 5-10 years
Creditsafe Technology
4.0
Hyderabad / Secunderabad

Asked in LTIMindtree

1d ago

Q. What is the code block to print the following output: 1, 3, 6, 9, 12, 15, ..., 99?

Ans.

The code block generates a sequence of numbers increasing by 3, starting from 1, up to 99.

  • Use a loop to iterate through numbers from 1 to 99.

  • Increment the number by 3 in each iteration.

  • Print the number if it is less than or equal to 99.

Asked in NeoSOFT

4d ago

Q. Cursors, it's types and describe syntax for SYS_REFCURSORS using stored procedure & functions.Its use in packages.

Ans.

Cursors in PL/SQL manage query results; SYS_REFCURSOR allows dynamic result sets in procedures and functions.

  • Cursors are pointers to context areas for SQL statements.

  • Types of cursors: Explicit (defined by the programmer) and Implicit (automatically created by Oracle).

  • SYS_REFCURSOR is a predefined cursor type that can hold a result set dynamically.

  • Syntax for declaring SYS_REFCURSOR: 'TYPE ref_cursor IS REF CURSOR;'.

  • Example of using SYS_REFCURSOR in a stored procedure: 'PROCEDU...read more

Share interview questions and help millions of jobseekers 🌟

man-with-laptop

Asked in LTIMindtree

6d ago

Q. What is a materialized view, and what types of refresh mechanisms does it have?

Ans.

A materialized view is a database object that stores the result of a query for faster access and can be refreshed periodically.

  • Materialized views store data physically, unlike regular views which are virtual.

  • They can improve performance for complex queries by precomputing and storing results.

  • Refresh mechanisms include:

  • 1. Complete Refresh: Rebuilds the entire materialized view from the base tables.

  • Example: `REFRESH MATERIALIZED VIEW my_view;`

  • 2. Fast Refresh: Updates only the...read more

Asked in LTIMindtree

5d ago

Q. What is the SQL query to dynamically retrieve the first day of the current month?

Ans.

Use the TRUNC function to get the first day of the current month in SQL.

  • Use the TRUNC function: `SELECT TRUNC(SYSDATE, 'MM') FROM dual;`

  • SYSDATE returns the current date and time.

  • TRUNC with 'MM' truncates the date to the first day of the month.

  • This query works in Oracle SQL.

Asked in LTIMindtree

4d ago

Q. What kind of information does an explain plan contain? Please elaborate.

Ans.

An explain plan provides details on how a SQL query will be executed, including the execution path and resource usage.

  • Execution Order: Shows the sequence in which operations are performed, e.g., SELECT, JOIN, FILTER.

  • Access Methods: Indicates how data is accessed, such as full table scans or index scans.

  • Join Methods: Describes how tables are joined, e.g., nested loops, hash joins.

  • Cost Estimates: Provides estimated resource usage, including CPU and I/O costs.

  • Cardinality Estimat...read more

4d ago

Q. What is pragma autonomous transactions. How does it work.

Ans.

Pragma autonomous transactions allow a PL/SQL subprogram to commit or rollback its own transactions independently of its caller.

  • Pragma autonomous transactions are used to execute a transaction independently of the main transaction.

  • It allows a subprogram to commit or rollback its own transactions without affecting the main transaction.

  • Autonomous transactions are often used for logging, auditing, or error handling purposes.

  • To declare an autonomous transaction, use the PRAGMA AU...read more

Asked in Oracle

5d ago

Q. Explain how a SELECT statement is parsed in an Oracle database.

Ans.

The parsing of a SELECT statement in Oracle database involves several steps.

  • The statement is first checked for syntax errors.

  • The query is then parsed to identify the objects involved and their relationships.

  • The optimizer determines the most efficient execution plan.

  • The plan is executed and the result set is returned.

Asked in Oracle

4d ago

Q. Explain how an insert/update statement is parsed in an Oracle database.

Ans.

An insert/update statement in Oracle database is parsed by the SQL parser to check syntax and semantics.

  • The SQL parser first checks the syntax of the insert/update statement to ensure it follows the rules of the SQL language.

  • Next, the parser checks the semantics of the statement, which involves verifying the existence and accessibility of the tables and columns referenced in the statement.

  • During parsing, the parser also determines the execution plan for the statement, which i...read more

Asked in Deloitte

2d ago

Q. How are partitions useful, and when should they be created?

Ans.

Partitions are useful for managing large tables and improving query performance.

  • Partitions allow for data to be split into smaller, more manageable chunks

  • Queries can be run on specific partitions, improving performance

  • Partitions can be based on various criteria such as date, range, or hash

  • Example: Partitioning a sales table by date can improve query performance for recent sales data

  • Example: Partitioning a customer table by region can improve query performance for regional ana...read more

Asked in LTIMindtree

4d ago

Q. What are the hints, and what functions do they serve?

Ans.

Hints in PL/SQL guide the optimizer to improve query performance by influencing execution plans.

  • Hints are special comments in SQL statements that provide instructions to the optimizer.

  • Examples include 'USE_NL' to enforce a nested loop join or 'INDEX' to force the use of a specific index.

  • They can help in scenarios where the optimizer's default choices lead to suboptimal performance.

  • Hints can be used to control join methods, access paths, and even parallel execution.

  • Syntax for ...read more

Asked in LTIMindtree

6d ago

Q. What are indexes, and how do they work internally?

Ans.

Indexes are database structures that improve query performance by allowing faster data retrieval.

  • Indexes are like a book's index, helping locate data quickly without scanning the entire table.

  • They are stored in a separate structure, often as B-trees or hash tables, which organize data for efficient access.

  • For example, a B-tree index allows for logarithmic time complexity for search operations.

  • Indexes can be unique (ensuring no duplicate values) or non-unique (allowing duplica...read more

Asked in PNB MetLife

5d ago

Q. What is hard parsing and soft parsing?

Ans.

Hard parse is when SQL statement is parsed every time it is executed. Soft parse is when SQL statement is parsed only once.

  • Hard parse is resource-intensive and can slow down performance.

  • Soft parse is faster and more efficient.

  • Hard parse occurs when there is a syntax error or when the SQL statement is not in the shared pool.

  • Soft parse occurs when the SQL statement is already in the shared pool.

  • Hard parse can be avoided by using bind variables.

  • Soft parse can be affected by chan...read more

Asked in NeoSOFT

4d ago

Q. Triggers. It's implementation and audit tables use in projects

Ans.

Triggers in PL/SQL automate actions in the database, while audit tables track changes for compliance and data integrity.

  • Types of Triggers: There are three main types of triggers - BEFORE, AFTER, and INSTEAD OF, which determine when the trigger action occurs.

  • Example of a BEFORE Trigger: A trigger that validates data before an insert operation, ensuring no null values are entered.

  • Audit Tables: These are special tables designed to log changes made to other tables, capturing deta...read more

Asked in Oracle

4d ago

Q. How do you access elements in XML/JSON data?

Ans.

To access elements in XML/JSON data, use appropriate methods like XPath for XML and dot notation for JSON.

  • For XML data, use XPath expressions to navigate and extract specific elements or attributes.

  • For JSON data, use dot notation to access nested objects or arrays.

  • In PL/SQL, you can use XMLTable or JSON_TABLE functions to extract data from XML or JSON respectively.

Asked in NeoSOFT

3d ago

Q. Materialised views. It's use in project work.

Ans.

Materialized views store query results for faster access, improving performance in data retrieval and reporting.

  • Materialized views are precomputed query results stored on disk, reducing the need for complex joins during runtime.

  • They are useful in data warehousing for summarizing large datasets, e.g., sales data aggregated by month.

  • Materialized views can be refreshed periodically or on-demand, ensuring data is up-to-date without impacting performance.

  • They can improve performan...read more

Asked in InFynd

3d ago

Q. What are the differences between DELETE, TRUNCATE, and DROP statements?

Ans.

DELETE removes specific rows, TRUNCATE removes all rows quickly, and DROP deletes the entire table structure.

  • DELETE: Removes specific rows based on a condition. Example: DELETE FROM employees WHERE id = 1;

  • TRUNCATE: Removes all rows from a table but keeps the structure. Example: TRUNCATE TABLE employees;

  • DROP: Deletes the entire table and its structure from the database. Example: DROP TABLE employees;

  • DELETE is slower as it logs each row deletion, while TRUNCATE is faster as it ...read more

Asked in Flydubai

1d ago

Q. Find the employee who has been absent for two consecutive days.

Ans.

Use SQL query to find employees who were absent for 2 consecutive days.

  • Use a SQL query to join the employee table with the attendance table

  • Filter the results to only include employees who have consecutive absent days

  • Group the results by employee to identify those who were absent for 2 consecutive days

Asked in Flydubai

3d ago

Q. What is the difference between VARRAY and Nested Tables?

Ans.

Varrays are fixed-size arrays while Nested Tables are dynamic arrays in PL/SQL.

  • Varrays have a maximum size specified at declaration, while Nested Tables can grow dynamically.

  • Varrays are stored in contiguous memory locations, while Nested Tables are stored in a separate table.

  • Varrays can be sparse, while Nested Tables are always dense.

  • Example: Varray - DECLARE TYPE phone_numbers IS VARRAY(3) OF VARCHAR2(15); Nested Table - DECLARE TYPE phone_numbers IS TABLE OF VARCHAR2(15);

Asked in Azentio

1d ago

Q. What is index ? and types?

Ans.

An index is a database object that improves the speed of data retrieval operations on a table.

  • Indexes are used to quickly locate data without having to search every row in a table.

  • Types of indexes include B-tree indexes, bitmap indexes, and function-based indexes.

  • Examples of indexes are primary keys, unique constraints, and indexes created explicitly on columns.

Asked in NeoSOFT

6d ago

Q. Describe your past project experience using PLSQL.

Ans.

As a Senior PL/SQL Developer, I have extensive experience in database design, optimization, and complex query development.

  • Database Design: Designed and implemented normalized database schemas for various applications, ensuring data integrity and efficiency.

  • Performance Tuning: Optimized PL/SQL code and SQL queries, reducing execution time by up to 50% through indexing and query restructuring.

  • Stored Procedures and Functions: Developed reusable stored procedures and functions fo...read more

Asked in Flydubai

1d ago

Q. Can we use COMMIT in triggers?

Ans.

No, COMMIT cannot be used in triggers.

  • COMMIT cannot be used in triggers as it can cause mutating table errors.

  • Triggers are automatically committed by the database after they are executed.

  • Using COMMIT in triggers can lead to data integrity issues and performance problems.

Asked in Accenture

1d ago

Q. What is the difference between UNION and UNION ALL?

Ans.

Union combines and removes duplicates, Union All combines without removing duplicates.

  • Union combines result sets and removes duplicates

  • Union All combines result sets without removing duplicates

  • Union is slower than Union All as it involves removing duplicates

  • Example: SELECT column1 FROM table1 UNION SELECT column1 FROM table2;

  • Example: SELECT column1 FROM table1 UNION ALL SELECT column1 FROM table2;

Asked in Deloitte

6d ago

Q. How do you fetch hierarchical data?

Ans.

Hierarchical data can be fetched using recursive queries or hierarchical queries.

  • Recursive queries use a common table expression (CTE) to repeatedly join a table to itself.

  • Hierarchical queries use the CONNECT BY clause to specify the parent-child relationship.

  • Both methods require a column that identifies the parent of each row, such as an ID or parent ID column.

  • Example: SELECT * FROM employees WHERE manager_id = 123 CONNECT BY PRIOR employee_id = manager_id

  • Example: WITH recur...read more

Asked in Infogain

2d ago

Q. What is a materialized view?

Ans.

A materialized view is a database object that contains the results of a query and is stored on disk for faster access.

  • Materialized views store the results of a query like a table, allowing for faster access to data.

  • They are updated periodically to reflect changes in the underlying data.

  • Materialized views are commonly used in data warehousing and reporting applications.

  • Example: CREATE MATERIALIZED VIEW mv_sales AS SELECT product_id, SUM(amount) FROM sales GROUP BY product_id;

1
2
Next

Interview Experiences of Popular Companies

Infosys Logo
3.6
 • 7.9k Interviews
Capgemini Logo
3.7
 • 5.1k Interviews
LTIMindtree Logo
3.7
 • 3k Interviews
Deloitte Logo
3.7
 • 3k Interviews
IBM Logo
3.9
 • 2.5k Interviews
View all
interview tips and stories logo
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories
Senior Plsql Developer Interview Questions
Share an Interview
Stay ahead in your career. Get AmbitionBox app
play-icon
play-icon
qr-code
Trusted by over 1.5 Crore job seekers to find their right fit company
80 L+

Reviews

10L+

Interviews

4 Cr+

Salaries

1.5 Cr+

Users

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2025 Info Edge (India) Ltd.

Follow Us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter
Profile Image
Hello, Guest
AmbitionBox Employee Choice Awards 2025
Winners announced!
awards-icon
Contribute to help millions!
Write a review
Write a review
Share interview
Share interview
Contribute salary
Contribute salary
Add office photos
Add office photos
Add office benefits
Add office benefits