• vs.satheesh (11/6/2012)


    I face one interview question.One salary table i have three column like (id,name,salary)

    Table Name:SalaryDetail

    id name salary

    1 arun 1000

    2 jothi 2000

    3 kavi 3000

    4 rahul 4000

    5 jeeva 5000

    In this above i want following result

    id name salary Salry2

    1 arun 1000 null

    2 jothi 2000 1000

    3 kavi 3000 2000

    4 rahul 4000 3000

    5 jeeva 5000 4000.

    Please reply this .

    What is the business logic by which you got the 4th column( Salry2 )?

    Though it is a bit evident, it would be better if you put it in words as otherwise people would only be guessing

    Additionally, if you include some code which you have come up with, we can be assured we are not spoon feeding you


    Kingston Dhasian

    How to post data/code on a forum to get the best help - Jeff Moden
    http://www.sqlservercentral.com/articles/Best+Practices/61537/