• ziangij (3/16/2011)I really didn't know that by adding Begin, End (twice or more), we can return 2 recordsets.

    You don't need multiple begin/end pairs to return 2 recordsets.

    create proc test

    as

    begin

    select 1

    select 2

    end

    or

    create proc test

    as

    select 1

    select 2

    will do just as well.

    We make regular use of procedures returning multiple recordsets. Using ADO you just use NextRecordSet to get at the data.