i
Infosys
Work with us
Filter interviews by
SQL is a query language used to interact with databases, while PL/SQL is a procedural language extension for SQL.
SQL is used for querying and manipulating data in databases.
PL/SQL is used for writing procedural code like loops, conditions, and functions.
SQL statements are executed one at a time, while PL/SQL blocks can contain multiple statements.
SQL is declarative, while PL/SQL is procedural.
Example: SQL - SELECT...
Regular expressions (regex) are sequences of characters that define search patterns for strings, used for pattern matching and manipulation.
Regex is used for validating input formats, e.g., email addresses: ^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$
It can extract specific patterns from text, such as phone numbers: \d{3}-\d{3}-\d{4}
Regex supports various metacharacters like '.', '*', and '+', which have speci...
Packages and types are two important components in PL/SQL used for organizing and defining reusable code and data structures.
Packages are containers for related procedures, functions, variables, and other PL/SQL constructs.
Types are user-defined data structures that can be used to define new data types in PL/SQL.
Packages can contain types as well as other PL/SQL constructs, providing a way to organize and encapsul...
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
Performance tuning is the process of optimizing the speed and efficiency of a system or application.
Identifying and resolving bottlenecks in the system
Optimizing SQL queries and database design
Improving code efficiency and reducing resource usage
Monitoring system performance and making adjustments as needed
A cursor is a pointer to a result set for a SQL query. It allows you to iterate through the rows of the result set.
Cursors are used in PL/SQL to process individual rows returned by a query.
Attributes of a cursor include %NOTFOUND, %FOUND, %ROWCOUNT, and %ISOPEN.
Example: OPEN cursor_name; FETCH cursor_name INTO variable; CLOSE cursor_name;
Use a self-join query to delete duplicates from the same table.
Use a self-join query to identify the duplicate records based on a unique identifier column.
Delete the duplicate records using the DELETE statement with the self-join condition.
Triggers are PL/SQL blocks that are automatically executed when certain events occur on a table.
Triggers can be used to enforce business rules, audit changes, or maintain data integrity.
Syntax: CREATE OR REPLACE TRIGGER trigger_name BEFORE/AFTER INSERT/UPDATE/DELETE ON table_name FOR EACH ROW BEGIN -- trigger logic here END;
Merge statement in PL/SQL combines insert and update operations based on a condition.
Use MERGE INTO statement followed by target table name
Specify USING clause with source table or subquery
Define ON condition to match rows for update or insert
Use WHEN MATCHED THEN UPDATE SET for update operation
Use WHEN NOT MATCHED THEN INSERT VALUES for insert operation
Named and unnamed exceptions in PL/SQL with examples
Named exceptions are user-defined exceptions with specific names like 'custom_exception'
Unnamed exceptions are predefined exceptions like 'NO_DATA_FOUND' or 'TOO_MANY_ROWS'
Named exceptions can be raised using RAISE statement with the exception name
Unnamed exceptions are raised automatically by the system in case of errors
Example of named exception: DECLARE custom...
I appeared for an interview in Nov 2024.
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 dire...
Performance tuning involves optimizing database queries and configurations for improved efficiency and speed.
Analyze execution plans to identify slow queries. For example, use EXPLAIN PLAN to see how Oracle executes a query.
Use indexing strategically. For instance, create indexes on columns frequently used in WHERE clauses to speed up data retrieval.
Optimize SQL queries by avoiding SELECT *, using WHERE clauses effecti...
Regular expressions (regex) are sequences of characters that define search patterns for strings, used for pattern matching and manipulation.
Regex is used for validating input formats, e.g., email addresses: ^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$
It can extract specific patterns from text, such as phone numbers: \d{3}-\d{3}-\d{4}
Regex supports various metacharacters like '.', '*', and '+', which have special me...
SQL is a query language used to interact with databases, while PL/SQL is a procedural language extension for SQL.
SQL is used for querying and manipulating data in databases.
PL/SQL is used for writing procedural code like loops, conditions, and functions.
SQL statements are executed one at a time, while PL/SQL blocks can contain multiple statements.
SQL is declarative, while PL/SQL is procedural.
Example: SQL - SELECT * FR...
Using GROUP BY clause with aggregate functions can obtain distinct values without using the DISTINCT keyword.
Use GROUP BY clause with aggregate functions like COUNT, SUM, AVG, etc.
Example: SELECT column_name, COUNT(*) FROM table_name GROUP BY column_name;
I applied via LinkedIn and was interviewed in Jul 2024. There was 1 interview round.
Use a self-join query to delete duplicates from the same table.
Use a self-join query to identify the duplicate records based on a unique identifier column.
Delete the duplicate records using the DELETE statement with the self-join condition.
Query to display 5th max salary in a table
Use the RANK() function to assign a rank to each salary
Filter the results to only show the row with rank 5
Order the salaries in descending order to get the 5th max salary
A cursor is a pointer to a result set for a SQL query. It allows you to iterate through the rows of the result set.
Cursors are used in PL/SQL to process individual rows returned by a query.
Attributes of a cursor include %NOTFOUND, %FOUND, %ROWCOUNT, and %ISOPEN.
Example: OPEN cursor_name; FETCH cursor_name INTO variable; CLOSE cursor_name;
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
Performance tuning is the process of optimizing the speed and efficiency of a system or application.
Identifying and resolving bottlenecks in the system
Optimizing SQL queries and database design
Improving code efficiency and reducing resource usage
Monitoring system performance and making adjustments as needed
Merge statement in PL/SQL combines insert and update operations based on a condition.
Use MERGE INTO statement followed by target table name
Specify USING clause with source table or subquery
Define ON condition to match rows for update or insert
Use WHEN MATCHED THEN UPDATE SET for update operation
Use WHEN NOT MATCHED THEN INSERT VALUES for insert operation
Triggers are PL/SQL blocks that are automatically executed when certain events occur on a table.
Triggers can be used to enforce business rules, audit changes, or maintain data integrity.
Syntax: CREATE OR REPLACE TRIGGER trigger_name BEFORE/AFTER INSERT/UPDATE/DELETE ON table_name FOR EACH ROW BEGIN -- trigger logic here END;
I applied via Company Website and was interviewed in Sep 2024. There was 1 interview round.
Packages and types are two important components in PL/SQL used for organizing and defining reusable code and data structures.
Packages are containers for related procedures, functions, variables, and other PL/SQL constructs.
Types are user-defined data structures that can be used to define new data types in PL/SQL.
Packages can contain types as well as other PL/SQL constructs, providing a way to organize and encapsulate r...
I applied via Approached by Company and was interviewed in Feb 2024. There was 1 interview round.
SQL Loader is a tool for loading data from external files into Oracle databases efficiently.
Use the command: sqlldr userid=username/password control=control_file.ctl
Control file specifies the format of the data file and how to load it.
Example control file: LOAD DATA INFILE 'data.csv' INTO TABLE my_table FIELDS TERMINATED BY ','
SQL Loader supports various data formats like CSV, fixed-width, etc.
You can use options like ...
Procedure is used to perform an action, while function returns a value.
Procedure does not return a value, while function does
Functions can be used in SQL queries, procedures cannot
Functions can be called from SQL statements, procedures cannot
In performance tuning, init refers to the initialization parameter file used by Oracle Database to configure various settings.
init is a text-based configuration file that contains parameters to optimize the performance of Oracle Database.
It is used to set parameters such as memory allocation, parallel processing, and resource utilization.
By tuning the init file, developers can improve the overall performance of the dat...
Named and unnamed exceptions in PL/SQL with examples
Named exceptions are user-defined exceptions with specific names like 'custom_exception'
Unnamed exceptions are predefined exceptions like 'NO_DATA_FOUND' or 'TOO_MANY_ROWS'
Named exceptions can be raised using RAISE statement with the exception name
Unnamed exceptions are raised automatically by the system in case of errors
Example of named exception: DECLARE custom_exce...
Execution plan is a roadmap created by the database optimizer to determine the most efficient way to execute a query.
Execution plan shows the steps the database will take to execute a query.
Query optimization involves finding the most efficient way to execute a query.
Optimization techniques include index usage, join methods, and access paths.
Understanding execution plans helps in tuning queries for better performance.
Types of cursors include implicit, explicit, and parameterized cursors.
Implicit cursors are automatically created by Oracle when a SQL statement is executed.
Explicit cursors are defined by the programmer using the DECLARE, OPEN, FETCH, and CLOSE statements.
Parameterized cursors allow for dynamic SQL statements to be executed with different parameters.
SQL is a query language used to interact with databases, while PL/SQL is a procedural language extension for SQL.
SQL is used for querying and manipulating data in databases.
PL/SQL is used for writing procedural code like loops, conditions, and functions.
SQL statements are executed one at a time, while PL/SQL blocks can contain multiple statements.
PL/SQL can be used to create stored procedures, functions, and triggers i...
SQL is a structured query language used to communicate with databases. SQL extensions add additional functionality to the language.
SQL is a standard language used to interact with databases
SQL extensions like PL/SQL add procedural programming capabilities to SQL
PL/SQL is an extension of SQL used in Oracle databases
I applied via Naukri.com and was interviewed in Nov 2021. There were 3 interview rounds.
What people are saying about Infosys
based on 8 interview experiences
Difficulty level
Duration
based on 20 reviews
Rating in categories
Bangalore / Bengaluru
5-10 Yrs
Not Disclosed
Technology Analyst
54.7k
salaries
| ₹4.8 L/yr - ₹10 L/yr |
Senior Systems Engineer
53.8k
salaries
| ₹2.5 L/yr - ₹6.3 L/yr |
Technical Lead
35.1k
salaries
| ₹9.4 L/yr - ₹16.4 L/yr |
System Engineer
32.5k
salaries
| ₹2.4 L/yr - ₹5.5 L/yr |
Senior Associate Consultant
31.2k
salaries
| ₹8.2 L/yr - ₹14 L/yr |
TCS
Wipro
Cognizant
Accenture