• So we should avoid pseudo cursor. Right?

    I never said anything like this.

    1) It will be treated as internal cursor. i.e it will perform looping internally.

    AFAIK all set processing in SQL Server uses internal cursors. And as long as CPU-cores execute single streams of instructions, all servers, programs and OS's will have to loop internally.

    But comparing to external cursor, it will be very fasy. Right?

    Yes.

    2) is it a good habit to use pseudo cursor in sql programming? if not, what is the workaround for this?

    It is a technique. It is not the most desirable technique, but neither is it entirely undesirable. And sometimes it is the best technique available for a problem.

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]