Plsql Developer

100+ Plsql Developer Interview Questions and Answers

Updated 16 Jul 2025
search-icon

Asked in TCS

2w ago

Q. What are the primary key and foreign key in database design, and can you provide examples of each?

Ans.

Primary key uniquely identifies each record in a table, while foreign key establishes a link between two tables.

  • Primary key ensures uniqueness and cannot have null values

  • Foreign key establishes a relationship between tables based on the primary key of another table

  • Example of primary key: EmployeeID in an Employee table

  • Example of foreign key: DepartmentID in an Employee table linking to DepartmentID in a Department table

Asked in TCS

2w ago

Q. What is a SQL query that can be used to find duplicate values in a database?

Ans.

Use a SQL query with GROUP BY and HAVING clause to find duplicate values in a database.

  • Use GROUP BY clause to group the values that are duplicated.

  • Use HAVING clause to filter out the groups that have more than one occurrence.

  • Example: SELECT column_name, COUNT(*) FROM table_name GROUP BY column_name HAVING COUNT(*) > 1;

1w ago

Q. 1.What is Trigger,procedure,cursor differentiate with example

Ans.

A trigger is a PL/SQL block that is automatically executed in response to a specific event. A procedure is a named PL/SQL block that performs a specific task. A cursor is a database object used to retrieve data from a result set.

  • A trigger is used to automatically execute a set of SQL statements when a specific event occurs, such as inserting, updating, or deleting data from a table.

  • A procedure is a reusable block of code that can be called multiple times to perform a specific...read more

Asked in TCS

1d ago

Q. What is SQL optimization. Normalization. Pragma usage

Ans.

SQL optimization, normalization, and pragma usage are important concepts in PL/SQL development.

  • SQL optimization involves improving the performance of SQL queries by analyzing and modifying the query structure, indexes, and data access patterns.

  • Normalization is the process of organizing data in a database to reduce redundancy and improve data integrity.

  • Pragma is a compiler directive that provides additional information to the compiler to optimize code performance.

  • Examples of p...read more

Are these interview questions helpful?

Asked in Flydubai

1d ago

Q. What is the output of the SQL query: select * from emp where rownum between 3 and 10; (assuming a maximum of 5 columns in the emp table)?

Ans.

The query will return no rows due to ROWNUM limitations in Oracle SQL.

  • ROWNUM is assigned before the WHERE clause is evaluated.

  • ROWNUM starts at 1 for the first row returned.

  • The condition 'between 3 and 10' is not valid for ROWNUM.

  • To get rows 3 to 10, use a subquery or analytic functions.

  • Example: SELECT * FROM (SELECT emp.*, ROWNUM rnum FROM emp) WHERE rnum BETWEEN 3 AND 10.

1w ago

Q. Write a query to display employee records having the same salary.

Ans.

The query displays employee records with the same salary.

  • Use the GROUP BY clause to group the records by salary.

  • Use the HAVING clause to filter the groups with more than one employee.

  • Select the necessary columns to display the employee records.

Plsql Developer Jobs

Oracle logo
PLSQL Developer - Core Banking 5-10 years
Oracle
3.7
Chennai
CGI logo
PLSQL Developer 8-13 years
CGI
4.0
Pune
CGI logo
Python with PL/SQL Developer 6-10 years
CGI
4.0
Hyderabad / Secunderabad

Asked in Greystar

2w ago

Q. What is the difference between procedures and functions?

Ans.

Procedures are used to perform an action, while functions return a value.

  • Procedures do not return a value, while functions do.

  • Functions can be called from SQL queries, while procedures cannot.

  • Functions must return a value, while procedures do not necessarily have to.

Asked in Infosys

2d ago

Q. Can we edit data in complex views, and will the underlying table be affected?

Ans.

Editing data in complex views can affect underlying tables, but it depends on the view's structure and rules.

  • Complex views often involve joins, aggregations, or groupings, making them non-updatable.

  • If a view is updatable, changes made to it will reflect in the underlying tables.

  • Example: A simple view on a single table can be updated directly.

  • Example: A view that aggregates data (e.g., SUM, COUNT) cannot be updated directly.

  • Triggers or INSTEAD OF triggers can be used to manage...read more

Share interview questions and help millions of jobseekers 🌟

man-with-laptop

Asked in IQVIA

2w ago

Q. What are indexes ? What Indexes?are drawbacks of

Ans.

Indexes are database structures used to improve query performance.

  • Indexes are created on one or more columns of a table.

  • They allow for faster data retrieval by reducing the number of disk I/O operations.

  • However, they can slow down data modification operations such as INSERT, UPDATE, and DELETE.

  • Indexes can also take up significant disk space and memory.

  • Different types of indexes include B-tree, bitmap, and hash indexes.

Asked in TCS

1w ago

Q. What are the definitions of the Substr and Instr functions?

Ans.

Substr function extracts a substring from a string, while Instr function returns the position of a substring within a string.

  • Substr function syntax: SUBSTR(string, start_position, length)

  • Example: SUBSTR('Hello World', 7, 5) will return 'World'

  • Instr function syntax: INSTR(string, substring)

  • Example: INSTR('Hello World', 'World') will return 7

Asked in Deloitte

2w ago

Q. How do you write a trigger to insert data into a table when an insert, delete, or update action occurs on a specified table?

Ans.

A trigger can automate data insertion in response to changes in a specified table.

  • Triggers are database objects that automatically execute when a specified event occurs.

  • To create a trigger for INSERT, DELETE, or UPDATE, use the CREATE TRIGGER statement.

  • Example: CREATE TRIGGER trg_after_insert AFTER INSERT ON source_table FOR EACH ROW INSERT INTO target_table (column1) VALUES (:NEW.column1);

  • You can define the timing of the trigger: BEFORE or AFTER the event.

  • Triggers can also h...read more

Asked in Mphasis

2w ago

Q. What are joins in SQL, and can you provide examples of their usage?

Ans.

Joins in SQL are used to combine rows from two or more tables based on a related column between them.

  • Joins are used to retrieve data from multiple tables based on a related column.

  • Common types of joins include INNER JOIN, LEFT JOIN, RIGHT JOIN, and FULL JOIN.

  • Example: SELECT * FROM table1 INNER JOIN table2 ON table1.column = table2.column;

Asked in Mphasis

3d ago

Q. What are the different types of cursors in database management systems?

Ans.

Types of cursors in database management systems include implicit, explicit, and parameterized cursors.

  • Implicit cursors are automatically created by the database when a SQL statement is executed.

  • Explicit cursors are defined by the programmer and give more control over the result set.

  • Parameterized cursors allow for dynamic SQL statements with parameters.

  • Examples: SELECT statement using implicit cursor, DECLARE, OPEN, FETCH, CLOSE for explicit cursor, using parameters in a curso...read more

Asked in Mphasis

2w ago

Q. What is a package, and how do you utilize it in your project?

Ans.

A package is a collection of related procedures, functions, variables, and other PL/SQL constructs.

  • Packages help organize and encapsulate code for easier maintenance and reuse.

  • They can contain both public and private elements.

  • Packages can be used to group related functionality together, improving code modularity.

  • Example: CREATE PACKAGE my_package AS ... END my_package;

Asked in Mphasis

2w ago

Q. What is the query to print the third highest salary from the given table?

Ans.

Use a subquery to find the third highest salary in a table.

  • Use the RANK() function to assign a rank to each salary in descending order.

  • Filter the results to only include rows with a rank of 3.

  • Consider handling ties in salaries appropriately.

Asked in TCS

1w ago

Q. Explain Triggers.

Ans.

Triggers are database objects that automatically execute in response to certain events.

  • Triggers can be used to enforce business rules, audit data changes, and maintain referential integrity.

  • They can be defined to execute before or after an event, such as a row being inserted, updated, or deleted.

  • Triggers can also be nested, meaning one trigger can execute another trigger.

  • Examples of triggers include automatically updating a timestamp when a row is modified, or preventing a de...read more

Asked in TCS

2w ago

Q. What is a cursor. And its types

Ans.

A cursor is a database object used to retrieve data from a result set one row at a time.

  • Types of cursors: Implicit, Explicit, Ref, and Dynamic

  • Implicit cursor is used for single row queries

  • Explicit cursor is used for multi-row queries

  • Ref cursor is used to point to a cursor variable

  • Dynamic cursor is used to execute dynamic SQL statements

Asked in Mphasis

3d ago

Q. Can you describe two complex JIRA issues you have worked on?

Ans.

Resolved a critical bug causing data loss and implemented a new feature for better user experience.

  • Identified root cause of data loss bug by analyzing database queries and logs

  • Collaborated with cross-functional teams to prioritize and implement a fix

  • Designed and implemented a new feature based on user feedback to enhance usability

Asked in Mphasis

1w ago

Q. What is a trigger in database management, and what are its different types?

Ans.

A trigger in database management is a special type of stored procedure that is automatically executed when certain events occur in a database.

  • Triggers can be used to enforce business rules, maintain referential integrity, and automate repetitive tasks.

  • There are two main types of triggers: row-level triggers and statement-level triggers.

  • Row-level triggers are fired for each row affected by a triggering statement, while statement-level triggers are fired once for each triggerin...read more

Asked in Deloitte

1d ago

Q. What is the procedure to write a PL/SQL function that checks the validity of a provided email address?

Ans.

A PL/SQL function to validate email addresses using regex patterns.

  • Define a function with a VARCHAR2 parameter for the email address.

  • Use regular expressions to match the email format.

  • Return TRUE if the email matches the pattern, otherwise FALSE.

  • Example regex: '^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}$'.

  • Consider edge cases like missing '@' or domain parts.

Asked in Mphasis

2w ago

Q. What steps did you take to perform root cause analysis in your project?

Ans.

I conducted thorough analysis by reviewing code, logs, and discussing with team members.

  • Reviewed code to identify potential issues

  • Analyzed logs for error messages and patterns

  • Discussed with team members to gather insights and perspectives

  • Used debugging tools to trace the root cause

Asked in TCS

2w ago

Q. Explain cursors, including their definition and types.

Ans.

Cursors are used to retrieve and manipulate data from a database in PL/SQL.

  • Cursors are like pointers to a result set, allowing us to fetch and process rows one by one.

  • There are two types of cursors: implicit and explicit.

  • Implicit cursors are automatically created by Oracle when executing a SQL statement.

  • Explicit cursors are declared and used by the programmer.

  • Explicit cursors provide more control and flexibility compared to implicit cursors.

  • Cursors can be used to fetch data f...read more

Asked in Infosys

2d ago

Q. What is the difference between a procedure and a function?

Ans.

Procedures and functions are both PL/SQL program units, but they have some key differences.

  • Procedures do not return a value, while functions do.

  • Procedures can have OUT parameters to pass values back to the caller, while functions cannot.

  • Functions can be used in SQL statements, while procedures cannot.

  • Functions must return a value, while procedures do not necessarily have to.

  • Procedures are typically used for performing actions, while functions are used for calculations or data...read more

Asked in Infosys

1w ago

Q. What is exception handling, and what is its syntax?

Ans.

Exception handling is a mechanism to handle errors or unexpected events in a program.

  • Syntax: BEGIN -- code block EXCEPTION -- exception handling block END;

  • Exceptions can be predefined or user-defined

  • Common predefined exceptions include NO_DATA_FOUND, TOO_MANY_ROWS, etc.

  • User-defined exceptions can be declared using the EXCEPTION keyword

5d ago

Q. Differentiate between Foreign key, Primary key, and Unique key.

Ans.

Foreign key, primary key, and unique key are all constraints used in database tables to enforce data integrity.

  • Primary key is a column or a set of columns that uniquely identifies each row in a table.

  • Foreign key is a column or a set of columns in one table that refers to the primary key in another table.

  • Unique key ensures that the values in a column or a set of columns are unique across all the rows in a table.

Asked in IAP Company

2w ago

Q. What is cursor? What is trigger & trigger performance

Ans.

A cursor is a pointer to a private SQL area that stores information about the processing of a SELECT or DML statement. A trigger is a stored program that is executed automatically in response to certain events or actions.

  • A cursor is used to retrieve data from a result set one row at a time

  • A trigger can be used to enforce business rules, audit changes to data, or replicate data to other tables

  • Triggers can be classified as row-level or statement-level triggers

  • Trigger performanc...read more

Asked in TCS

2w ago

Q. What is a dynamic cursor in database management?

Ans.

A dynamic cursor in database management allows for the execution of different SQL queries at runtime.

  • Dynamic cursors are used when the SQL query to be executed is not known until runtime.

  • They allow for flexibility in querying the database based on user input or other conditions.

  • Dynamic cursors can be used to handle varying result sets or conditions in a more efficient manner.

  • Example: Using a dynamic cursor to search for different products based on user-selected criteria.

Asked in Mphasis

1w ago

Q. What is the difference between procedures and functions in programming?

Ans.

Procedures are used to perform an action, while functions return a value.

  • Procedures do not return a value, while functions do.

  • Functions can be used in SQL queries, while procedures cannot.

  • Functions can be called from within SQL statements, while procedures cannot.

  • Procedures can have OUT parameters to return multiple values, while functions can only return a single value.

Asked in Info Edge

2d ago

Q. Write a SQL query to find the nth highest salary.

Ans.

SQL query to find the nth highest salary

  • Use the ORDER BY clause to sort the salaries in descending order

  • Use the LIMIT clause to select the nth highest salary

3d ago

Q. How can I fetch values from a table containing even numbers while excluding specific values?

Ans.

Fetch even numbers from a table while excluding specific values using SQL queries.

  • Use the MOD function to filter even numbers: SELECT * FROM table WHERE MOD(column_name, 2) = 0;

  • To exclude specific values, use the NOT IN clause: SELECT * FROM table WHERE MOD(column_name, 2) = 0 AND column_name NOT IN (excluded_value1, excluded_value2);

  • You can also use a subquery to exclude values: SELECT * FROM table WHERE MOD(column_name, 2) = 0 AND column_name NOT IN (SELECT excluded_column ...read more

Previous
1
2
3
4
5
6
7
Next

Interview Experiences of Popular Companies

TCS Logo
3.6
 • 11.1k Interviews
Accenture Logo
3.7
 • 8.7k Interviews
Infosys Logo
3.6
 • 7.9k Interviews
Cognizant Logo
3.7
 • 5.9k Interviews
Capgemini Logo
3.7
 • 5.1k Interviews
View all

Top Interview Questions for Plsql Developer Related Skills

Interview Tips & Stories
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories
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