Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2009
    Posts
    37

    Unanswered: Can i return multiple values from a function

    hi
    how can i return multiple values from a sql function

    thanks

  2. #2
    Join Date
    Oct 2009
    Posts
    19
    You can create a table-valued function that returns a table, will that help?
    Example:
    Code:
    CREATE FUNCTION MYFunction
                  	(@AnyParams INT)
            
            		RETURNS TABLE
    AS
    RETURN 
    (
    		SELECT * FROM YourData
    )
    -----------------------------------
    Free SQL server monitoring for DBA's
    SQL DBA manager by BlueThames.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •