- Nth maximum salary in (two ways)
- Delete the duplicates in table?
- Difference between CTE and Temp tables?
- Indexes in SQL and Uses?
- Table valued parameters in SQL?
- Transactions in sql ?
- Magic tables in sql?
- Difference between SP and Functions ?
- CTE ?
- CTE multiple select statements?
- Views and Temp Table?
- Duplicate, nth highest, 2nd highest and joins with queries?
- Multiple queries to find having, count, order by, where?(where employee sal > 5000 and use having)
- How to choose Stored procedure and query?
- To find employees whose DOB is today and lateral?
- CTE and Temp Table differences?
- Difference b/w triggers and stored procedures? use of each of them?
- Difference b/w temp table and view?
- Difference b/w CTE and view?
- DML and DDL?
- Difference b/w truncate, drop and delete?
- Union and Union all?
- Joins, types and queries?
- Update query if a table has only one gendre column to swap reports from male to female
- What is difference between char and varchar?
- How can we remove duplicate records from the table which doesn’t have primary key ?
- Without using join can we concatenate tables?
- Return string without space (“gt core”) in SQL query?
- What is Table valued parameter& where it will be stored?
- Can we return multiple rows of data from function?
- Can we use multple transactions in single execution/procedure?
- What about constraints,indexes in case of truncate?
- What is Diffrent type of trigger in SQL ? Can we create a trigger on Column?
- Temp table and Global Temp table?
- CTE (Second highest salary), difference between Rank() and Dens_Rank()?
- Fetch then delete duplicate records ?
- Optimize the Query(Basic things we look for in order to increase the performance)?
- Primary key and unique key diff(where we use unique key)?
- Query on total marks for a user(group by)?
- First() and FirstOrDeafult() differences/ single() and SingleOrDefault?
- Write a query on join?
- Write a query to get second highest salary ?
- How to apply order by for two columns (Employee collection is there order it by Name and AGE)?
- Lazy loading and Eager loading?
- Explain Rank, Dense_Rank?
- Is function return multiple rows?
- Disadvantages of Non-Clustured Index?
- Where indexes are stored?
- Return 0 if int column has null?
- What is @@IDENTITY ?
- Write query to get employee details, who are having more than employee manager salary?
- Write query to get the hierarchy of emp, managers based on roles?
Posted inInterview Questions SQL