SQL Server Performance

can procedure return multiple rows?

Discussion in 'Getting Started' started by raviatvns, Mar 16, 2011.

  1. raviatvns New Member

    how to return multiple rows with stored procedure..
  2. FrankKalis Moderator

    If, for example, you code a procedure like this:
    CREATE PROCEDURE Foo.bar
    AS
    SELECT .... FROM TABLE WHERE ...
    GO
    The procedure will return all rows from TABLE that match the WHERE clause. This maybe be 0, 1, or more rows.
    If you are asking how to return multiple resultsets from a procedure like this:
    CREATE PROCEDURE Foo.bar
    AS
    SELECT ... FROM TABLEA WHERE ...
    SELECT ... FROM TABLEB WHERE ...
    GO
    The procedure will return 2 resultsets with matching rows from TABLEA and TABLEB. Then it is up to the client to deal with these multiple resultsets.
  3. Madhivanan Moderator

    There is a different in rows and resultsets. If you meant the resultsets, yes you can return it as shown by Frank
  4. ccm001 New Member

    Kids find out tiffany anheng by method of using their 5 senses along using the feeling of touch (creating) can advantage your child in that it permits them to explore what they think and what they see. By tiffany ringer expressing by themselves by method of the artwork of drawing, youngsters find out easy methods to much tiffany bla i-tasten ringer better concentrate on chores and see them by method of right up until they're done. They obtain the independence to hold vivid detail to their tiffany Øredobber worldview. They're in a location to create pictures within their views after which allow it to be tangible. This allows to tiffany co produce their precise reputation skills.

Share This Page