1. Add Primary key to existing Table
  2. Find Occurance of letter in String
  3. Different ways to Delete duplicate records
  4. Difference between ROW_NUMBER(), RANK() and DENSE_RANK()
  5. Find Nth Highest Salary
  6. Print FirstName and LastName on Seperate rows
  7. Explain LEAD() and LAG() functions
  8. What is Magic Table in SQL
  9. Explain Function vs Stored Procedures
  10. Difference between Delete , 
  11. Difference between #Table, ##Table, @Table
  12. What will be the output for below table for INNER JOIN, LEFT JOIN, RIGHT JOIN, FULL JOIN and CROSS JOIN
TableA TableB
1 1
1 1
1


  1. What is a Cursor? What are the different Types of Cursor?
  2. What is Trigger?
  3. Difference between Stuff and Replace?