Support us .Net Basics C# SQL ASP.NET ADO.NET MVC Slides C# Programs Subscribe Buy DVD

SQL Server Interview Questions and Answers



Part 1 - How to find nth highest salary in sql | Sildes
Part 2 - SQL query to get organization hierarchy | Slides
Part 3 - How does a recursive CTE work | Slides
Part 4 - Delete duplicate rows in SQL | Slides
Part 5 - SQL query to find employees hired in last n months | Slides
Part 6 - Transform rows into columns in sql server | Slides
Part 7 - SQL query to find rows that contain only numerical data | Slides
Part 8 - SQL Query to find department with highest number of employees | Slides
Part 9 - Difference between inner join and left join | Slides
Part 10 - Join 3 tables in sql server | Slides
Part 11 - Real time example for right join | Slides
Part 12 - Can we join two tables without primary foreign key relation | Slides
Part 13 - Difference between blocking and deadlocking | Slides

9 comments:

  1. thanks for giving sql interview questions....sir can u upload more interview questions.....it may help to all of us....

    ReplyDelete
  2. Hello sir i have a question that if i have a table called
    tblemployee with Id,Name,Age,Salary as column and Id is
    primary key if i will write select * from tblemployee
    where age=some value that is present in age column and only primary key is there on Id column so here clustered index will work or not if yes then how bcaz index is on Id
    column?????????????

    ReplyDelete
  3. No it will not work as clustered index.

    ReplyDelete
  4. Hello sir thanks for giving interview questions....can u upload about "What is Sql tuning and how to achieve it ?"

    ReplyDelete
  5. Hi Sir,

    I have a question.

    If I have a sequence in where clause , how can I fetch data order by data in where clause and null for non matching data.

    e.g : select * from resources where n_res_id in (4,5,6,2,1)

    Expected result :

    id name
    4 Abc
    5 Asd
    6 null
    2 xyx
    1 null

    ReplyDelete
    Replies
    1. if you are retrieving selected ids from table:
      string str="";
      //use datareader :

      then
      while(dr.Read())
      {
      string id=dr["id"].tostr();
      str+=id+",";
      }
      str=str.Remove(str.Length-1);

      pass this str to your query.







      Delete
  6. Hi Hope you can make a video on how to Distribute an amortization schedule for a loan based on schedule like Monday, Wdnesday Friday (MWF) and Tuesday, Thursday and Saturday (TTHS) payment schedule for a specified number of days or months.

    ReplyDelete
  7. please help in using variables used in stored procedure i m very confused using variables how they hold values .

    ReplyDelete
  8. Hell Sir ,
    I need your help in sql server 2008, will you please send me important topic which always ask in interview regarding SQL Server 2008 for one yr experience.

    ReplyDelete

If you like this website, please share with your friends on facebook and Google+ and recommend us on google using the g+1 button on the top right hand corner.