Saturday, 15 February 2014

T- SQL Interview Questions and Answer

T- SQL Interview Questions and Answer

  1. Different type of statements in SQL?
  2. What's the use of INTO keyword in Select statement in SQL?
  3. How do you add a column in an already existing table in SQL?
  4. How to update a value in a column in SQL?
  5. Can you rename an object in SQL?
  6. What is identity in SQL and whats the use of it?
  7. How to reset an identity?
  8. Difference between having and where clause?
  9. What data types have you used to setup a table?
  10. Whats the different between nvarchar and varchar?
  11. Difference between delete and truncate command ?
  12. Difference between truncate and drop command?
  13. What are joins in sql and explain different types of Joins?
  14. Difference between Union and Union All?
  15. What are Indexes?
  16. Different Types of indexes?
  17. Difference between clustered and non - clustered indexes?
  18. What are Views in SQL?
  19. What is CTE in SQL?
  20. Difference between CTE and Views?
  21. What is temp table?
  22. What is temporary variable?
  23. Difference between temp table and temp variable?
  24. Difference between temp table and CTE?
  25. What is Sub-Query in SQL?
  26. What is Nested query in SQL?
  27. What is inline Query in SQL?
  28. What are ranking functions in SQL?
  29. Difference between Rank and Dense Rank?
  30. Which Ranking functions is used to delete duplicate rows from a table? 
  31. what is store procedure?
  32. what is UDF in SQL?
  33. difference between a store procedure and function in SQL?
  34. whats the use of NO COUNT?
  35. What is charindex function used for in SQL?
  36. What is substring function used for in SQL?
  37. What is coalesce function in SQL?
  38. difference between coalesce and ISNULL function?
  39. what is datediff function?
  40. what is dateadd function?
  41. explain functionality of Case function?
  42. how to use Case function in Select statement?
  43. Write a query to generate Running Total?
  44. Write a query to generate Running Average Values?
  45. What is BCP in SQL?


  1. In order to be irreplaceable one must always be different. See the link below for more info.


  2. I am so glad to be given a chance to read your wonderful article. Im looking forward to read more of your works and posts. You did a good job! Try to visit my site too and enjoy.