Planetcast
Schaeffler India Interview Questions and Answers
Q1. Difference between clustered and non clustered index
Clustered index determines the physical order of data in a table, while non-clustered index has a separate structure.
Clustered index sorts and stores the data rows in the table based on their key values, while non-clustered index has a separate structure that contains the key values and a pointer to the data row.
A table can have only one clustered index, while it can have multiple non-clustered indexes.
Clustered index is faster for retrieving large amounts of data, while non-...read more
Q2. Difference between execute scalar and execute nonquery
ExecuteScalar returns single value while ExecuteNonQuery does not return any value.
ExecuteScalar is used for retrieving a single value from the database, such as a count or sum.
ExecuteNonQuery is used for executing SQL statements that do not return any value, such as INSERT, UPDATE, DELETE.
ExecuteScalar returns the first column of the first row of the result set, while ExecuteNonQuery returns the number of rows affected by the query.
ExecuteScalar is faster than ExecuteNonQuer...read more
Q3. Difference between rank and dense rank in c#
Rank assigns unique numbers to each distinct value, while dense rank assigns consecutive numbers to each distinct value.
Rank and DenseRank are used to assign a unique number to each distinct value in a sorted list.
Rank assigns a unique number to each distinct value, but leaves gaps for ties.
DenseRank assigns consecutive numbers to each distinct value, without leaving gaps for ties.
In C#, Rank and DenseRank are available as LINQ extension methods.
Example: Given a list of score...read more
Q4. Difference between function and Stored procedure
Functions return a value while stored procedures do not.
Functions are used to perform a specific task and return a value to the caller.
Stored procedures are used to execute a set of statements and do not return a value.
Functions can be used in SQL statements while stored procedures cannot.
Functions can be called from within stored procedures.
Functions can be used in expressions while stored procedures cannot.
Q5. Difference between ienumerable and iqueryable
IEnumerable is read-only and forward-only while IQueryable is queryable and can be filtered.
IEnumerable is used for in-memory collections while IQueryable is used for querying databases.
IQueryable is more efficient for large datasets as it allows for server-side filtering.
IQueryable extends IEnumerable and adds additional functionality for querying data sources.
Example: IEnumerable
numbers = new List { 1, 2, 3 }; IQueryable queryableNumbers = numbers.AsQueryable();
Q6. Reflection and indexers in c#
Reflection and indexers in C#
Reflection allows inspecting and manipulating metadata of types, objects, and assemblies at runtime
Indexers provide a way to access elements of a class or struct using array-like syntax
Reflection can be used to dynamically access and invoke indexers
Top Software Engineer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month