SQL – Questions

  1. Nth maximum salary in (two ways)
  2.  Delete the duplicates in table?
  3.  Difference between CTE and Temp tables?
  4.  Indexes in SQL and Uses?
  5. Table valued parameters in SQL?
  6. Transactions in sql ?
  7. Magic tables in sql?
  8. Difference between SP and Functions ?
  9. CTE ?
  10. CTE multiple select statements?
  11. Views and Temp Table?
  12. Duplicate, nth highest, 2nd highest and joins with queries?
  13.  Multiple queries to find having, count, order by, where?(where employee sal > 5000 and use having)
  14. How to choose Stored procedure and query?
  15. To find employees whose DOB is today and lateral?
  16. CTE and Temp Table differences?
  17. Difference b/w triggers and stored procedures? use of each of them?
  18. Difference b/w temp table and view?
  19. Difference b/w CTE and view?
  20. DML and DDL?
  21. Difference b/w truncate, drop and delete?
  22. Union and Union all?
  23. Joins, types and queries?
  24. Update query if a table has only one gendre column to swap reports from male to female
  25. What is difference between char and varchar?
  26. How can we remove duplicate records from the table which doesn’t have primary key ?
  27. Without using join can we concatenate tables?
  28. Return string without space (“gt core”) in SQL query?
  29. What is Table valued parameter& where it will be stored?
  30. Can we return multiple rows of data from function?
  31. Can we use multple transactions in single execution/procedure?
  32. What about constraints,indexes in case of truncate?
  33. What is Diffrent type of trigger in SQL ? Can we create a trigger on Column?
  34. Temp table and Global Temp table?
  35. CTE (Second highest salary), difference between Rank() and Dens_Rank()?
  36. Fetch then delete duplicate records ?
  37. Optimize the Query(Basic things we look for in order to increase the performance)?
  38. Primary key and unique key diff(where we use unique key)?
  39. Query on total marks for a user(group by)?
  40. First() and FirstOrDeafult() differences/ single() and SingleOrDefault?
  41. Write a query on join?
  42. Write a query to get second highest salary ?
  43. How to apply order by for two columns (Employee collection is there order it by Name and AGE)?
  44. Lazy loading  and Eager loading?
  45. Explain Rank, Dense_Rank?
  46. Is function return multiple rows?
  47. Disadvantages of Non-Clustured Index?
  48. Where indexes are stored?
  49. Return 0 if int column has null?
  50. What is @@IDENTITY ?
  51. Write query to get employee details, who are having more than employee manager salary?
  52. Write query to get the hierarchy of emp, managers based on roles?

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *