• Thanks Sean Lange for your reply.

    1) Yes you are correct the rowcount should be set back to 0. So I have modified the query to below

    SET ROWCOUNT 1

    select * from employees order by id desc

    SET ROWCOUNT 0

    2) Also it won't work when you are setting the identity(100, -1) value to negative value.

    3) For this question (If a table is having only one identity column how can we insert records into this table?)

    I know this is pointless to have a table with only one identity column and there are no other columns.

    However the interviewer trys to confuse the person with such question as he may have never tried it.